Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] develop from Orcpub:develop #62

Merged
merged 25 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8a56459
Merge remote-tracking branch 'DMV-orcpub/develop' into develop
codeGlaze Jun 25, 2020
a1e80c9
Merge remote-tracking branch 'DMV-orcpub/develop' into develop
codeGlaze Feb 14, 2021
e6f8543
Merge remote-tracking branch 'DMV-orcpub/develop' into develop
codeGlaze Apr 11, 2021
6c13e07
Merge remote-tracking branch 'Orcpub/develop' into develop
codeGlaze Jul 17, 2021
e54184d
Merge remote-tracking branch 'DMV-orcpub/develop' into develop
codeGlaze Jul 20, 2021
d55014a
Merge remote-tracking branch 'DMV-orcpub/develop' into develop
codeGlaze Sep 1, 2021
3c588ba
Merge remote-tracking branch 'origin/develop' into develop
codeGlaze Nov 24, 2021
6f812b4
Merge remote-tracking branch 'Orcpub/develop' into develop
codeGlaze Nov 30, 2021
bf23375
Merge remote-tracking branch 'Orcpub/develop' into develop
codeGlaze Jan 27, 2022
2e2e41b
Merge remote-tracking branch 'origin/develop' into develop
codeGlaze Oct 2, 2022
965df3e
Merge remote-tracking branch 'DMV-orcpub/develop' into develop
codeGlaze Oct 2, 2022
89564a2
Merge remote-tracking branch 'upstream/develop' into develop
codeGlaze Jun 17, 2023
0e6dc61
Update version
datdamnzotz Sep 18, 2023
7b98af7
Merge branch 'develop' of github.com:Orcpub/orcpub into opdevelop
datdamnzotz Sep 18, 2023
f199352
Update version
datdamnzotz Sep 18, 2023
98573d8
Merge remote-tracking branch 'upstream/develop' into develop
codeGlaze Mar 11, 2024
5dc7f02
Fixes #602 - minor - SVG icon swap
codeGlaze Mar 11, 2024
9f41415
Merge branch '602-fix-icon-asclepius-svg' into tinkan-wip
codeGlaze Mar 11, 2024
7f64b5a
Fixes custom weapons/items not displaying on PDFs
codeGlaze Mar 12, 2024
d57501d
Merge pull request #604 from codeGlaze/602-fix-icon-asclepius-svg
datdamnzotz Mar 28, 2024
1cee3f6
Merge pull request #605 from codeGlaze/35-fix-pdf-weapon-display
datdamnzotz Mar 28, 2024
3ba9e9c
Merge branch 'develop' of github.com:Orcpub/orcpub into opdevelop
datdamnzotz Mar 28, 2024
8a984c9
Version bump
datdamnzotz Mar 28, 2024
4febabf
Update README.md
codeGlaze Mar 29, 2024
cdca12f
[minor] Update README.md
codeGlaze Mar 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ We work on forks, and branches. Fork our repo, then create a new branch for any

- Install Java: http://openjdk.java.net/
- or http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Download [Datomic](https://www.datomic.com/get-datomic.html), and unzip it into a directory.
- For MacOS/Linux Download [Datomic](https://www.datomic.com/get-datomic.html), and unzip it into a directory.

* For Windows [DMV Datomic](https://dungeonmastersvault.app.box.com/s/f9qifk069zfpwjr4poy6u1ngw6dgieqc) - newer versions do not work on Windows. it's a known issue that the Datomic team hasn't bothered to solve.

Launch Datomic by going to shell/cmd prompt in the unzipped directory and run:

Expand Down Expand Up @@ -284,7 +286,10 @@ You can use the community edition of [IntelliJ IDEA](https://www.jetbrains.com/i
### VS Code
You can use the open source edition of [Visual Studio Code](https://code.visualstudio.com/Download) with the Calva: Clojure & ClojureScript Interactive Programming, Clojure Code, and Bookmarks Extensions.

To start REPL with VS Code, first launch datomic in a cmd window, then jack-in using the Leiningen + Legacy Figwheel, figwheel-native, and select the :dev and optionally :start-server.
To start REPL with VS Code:
* first launch datomic in a cmd window with the transactor snippet from above: `bin\transactor config/samples/free-transactor-template.properties`
* you can also just add that to a `.ps1` file inside your project for easier reference eg. `run-datomic ps1`
* THEN jack-in using the `Leiningen + Legacy Figwheel`, `figwheel-native`, and select the `:dev` and optionally `:start-server`

### REPL

Expand Down Expand Up @@ -453,7 +458,7 @@ For this reason we have to build a dependency graph of derived attributes and th
## FAQs
**Q: I'm a newb Clojure developer looking to get my feet wet, where to start?**

**A:** *First I would start by getting the fundamentals down at http://www.4clojure.com/ From there you might add some unit tests or pick up an open issue on the "Issues" tab (and add unit tests with it).*
**A:** *First I would start by getting the fundamentals down at https://4clojure.oxal.org/ From there you might add some unit tests or pick up an open issue on the "Issues" tab (and add unit tests with it).*


**Q: Your DSL for defining character options is pretty cool, I can build any type of character option out there. How about I add a bunch on content from the Player's Handbook?**
Expand Down
1 change: 1 addition & 0 deletions resources/public/image/black/rod-of-asclepius.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/public/image/rod-of-asclepius.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions src/cljc/orcpub/dnd/e5/template.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,22 @@
(assoc a k other-v other-k v))))))

(def ability-icons
"Icons / names are provided by https://game-icons.net/"
{::char5e/str "strong"
::char5e/con "caduceus"
::char5e/con "rod-of-asclepius"
::char5e/dex "body-balance"
::char5e/int "read"
::char5e/wis "meditation"
::char5e/cha "aura"})

(defn ability-icon [k size theme]
;; REVIEW: use generic function for all icons instead?
(defn ability-icon
"Takes [k size theme] to generate css class name based on the size and theme.
`k` is the icon name/key in image set,
`size` sets both h and w,
`theme` sets light/dark color and opacity.
Only used for `ability-icons` -- see body of function below."
[k size theme]
(let [light-theme? (= "light-theme" theme)]
[:img {:class-name (str "h-" size " w-" size (if light-theme? " opacity-7"))
:src (str (if light-theme? "/image/black/" "/image/") (ability-icons k) ".svg")}]))
Expand Down
21 changes: 17 additions & 4 deletions src/cljc/orcpub/pdf_spec.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,22 @@
(str (dice/dice-string die-count die mod)
(if damage-type (str " " (name damage-type)))))

(defn attacks-and-spellcasting-fields [built-char]
(let [all-weapons (mi5e/equipped-items-details (char5e/all-weapons-inventory built-char) mi5e/all-weapons-map)
(defn attacks-and-spellcasting-fields
"For each weapon, we are creating a new map with the name, the attack bonus, and the damage.
The attack bonus is calculated using the function 'char5e/best-weapon-attack-modifier' which
calculates the attack bonus for a specific weapon.
The damage is calculated using the function 'damage-str' which takes the damage die, damage die count,
the damage modifier, and the damage type, and combines them into a string of the form 'dice-string damage-type'.
If the weapon is versatile, we also create a second map, where the name is suffixed with ' (two-handed)'
and the attack bonus and damage is calculated for the versatile form of the weapon.
We then remove any nil maps, and mapcat concatenates all of the maps into a single list.
The remove function filters out weapons of type 'ammunition'."
[built-char]
(let [all-weapons ; map of all weapons in inventory
(mi5e/equipped-items-details ; function to filter for equipped weapons
(char5e/all-weapons-inventory built-char)
@(subscribe [::mi5e/all-weapons-map]) ; re-frame subscription for all weapons
)
weapon-fields (mapcat
(fn [{:keys [name ::weapon5e/damage-die ::weapon5e/damage-die-count ::weapon5e/damage-type] :as weapon}]
(let [versatile (:versatile weapon)
Expand All @@ -452,8 +466,7 @@
all-weapons))
first-3-weapons (take 3 weapon-fields)
rest-weapons (drop 3 weapon-fields)
number-of-attacks (char5e/number-of-attacks built-char)
]
number-of-attacks (char5e/number-of-attacks built-char)]

(apply merge
{:attacks-and-spellcasting (str "Number of Attacks: " number-of-attacks "\n"
Expand Down
6 changes: 3 additions & 3 deletions src/cljs/orcpub/ver.cljc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns orcpub.ver)
; To be updated by build server
(defn version [] "v2.5.0.22")
(defn date [] "08-23-2021")
(defn description [] "")
(defn version [] "v2.5.0.25")
(defn date [] "03-28-2024")
(defn description [] "Herholin Copperflayer the Dwarf")
Loading