Skip to content

Commit

Permalink
Merge pull request #66 from lonevvolf/book-29
Browse files Browse the repository at this point in the history
Book 29
  • Loading branch information
cracrayol authored Sep 30, 2024
2 parents e855f54 + 71bef3c commit 4630111
Show file tree
Hide file tree
Showing 81 changed files with 5,474 additions and 411 deletions.
1 change: 1 addition & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
npm run test --kaibook=1 --kaisect=tssf
npm run dist
- name: Summarize Tests
if: '!cancelled()'
run: npx github-actions-ctrf ctrf/ctrf-report.json
- name: 'Tar files'
run: tar -cvf dist.tar -C dist .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Kai Chronicles

[Kai Chronicles](https://kaichronicles.projectaon.org) is a game player for Lone Wolf game books. Books 1 - 26 are playable. The game player can run as a website.
[Kai Chronicles](https://kaichronicles.projectaon.org) is a game player for Lone Wolf game books. Books 1 - 29 are playable. The game player can run as a website.

This is a fork from the [original "Kai Chronicles"](https://github.com/tonib/kaichronicles) as tonib stopped development in November 2021.

Expand Down
36 changes: 30 additions & 6 deletions doc/README-mechanics.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ There are some keywords that can be used on expressions. They have the following
* **[ARROWS]**: Current number of arrows on the quiver
* **[BOWBONUS]** : Bonus for bow usage: It's Weaponmastery bonus + bow object bonus (see "silverbowduadon" object). It will be -4 if the player has no bow
* **[NUMBERPICKER]**: The selected number on the "numberPicker" UI
* **[NUMBERPICKERXXX]**: The selected number on the "numberPicker" UI for the "numberPicker" with the given index
* **[DISCIPLINEPICKER]**: The selected discipline index in the actionChart disciplines list

## Codes for Magnakai disciplines
Expand Down Expand Up @@ -156,7 +157,7 @@ Execute once only. New Order: PERMANENTLY damage the player's Kai Weapon
```xml
<damageKaiWeapon damage="-2" />
```
Permanently applies -2CS to the player's Kai Weapon
Permanently applies the specified CS penalty to the player's Kai Weapon

### setSkills
Game setup: The player selects the initial Endurance and Combat Skill
Expand Down Expand Up @@ -222,7 +223,7 @@ decrease a counter, use the "pick" rule. The "objectId" can be one or more objec

If you set more than one object id, the first one owned by the player will be dropped

The property "backpackItemSlots" and specialItemSlots is used to drop objects on some given Backpack / Special Items positions. They
The property "backpackItemSlots", "weaponSlots" and "specialItemSlots" is used to drop objects on some given Backpack / Weapon / Special Items positions. They
can contain the index positions (1-based), or "last" for the last item

If the optional property "restorePoint" is specified, the dropped item will can be restored with the rule "restoreInventoryState", with
Expand Down Expand Up @@ -270,6 +271,13 @@ This will add the combat skill bonus, plus bow object bonus

A "randomTableIncrement" with a increment="reset" will reset to zero any previous increment.

### randomNumber
```xml
<randomNumber />
```

Chooses a random number and stores it. Can be read out with [RANDOM]. Should not be used on sections with <randomTable> elements.

### test
```xml
<test not="true" hasDiscipline="anmlknsp">
Expand Down Expand Up @@ -300,10 +308,11 @@ will be executed.
* **hasWeaponskillWith="weaponType"** : The player has "Weaponskill" (current book discipline, no loyalty bonus) with the given weapon type?
* **canUseBow="boolean"** : The player has a bow and one arrow (or not)?
* **currentWeaponSpecial="boolean"** : Current weapon is a Special Item (or not)?
* **currentWeaponMagical="boolean"** : Current weapon is has a CS or EP effect (or not)?
* **currentWeaponMagical="boolean"** : Current weapon has a CS or EP effect (or not)?
* **isGlobalRuleRegistered="globalRuleId"** : A global rule with a given id is currently registered?
* **objectOnSection="objectId1|objectId2|..."**: Some of these objects is available on the current section?
* **pickedSomethingOnSection="sectionId"**: Did the player pick something on the given section?
* **soldSomethingOnSection="sectionId"**: Did the player sell something on the given section?

To make AND conditions, embed test tags. Example: Enable a choice if the player has the lantern, or torch AND tinderbox:
```xml
Expand Down Expand Up @@ -401,6 +410,7 @@ the following properties:
* **index="number"**: Index (zero based) of the combat to which it refers
* **combatSkillModifier="bonus"**: Absolute bonus (positive or negative) for Lone Wolf combat skill on this combat
* **combatSkillModifierIncrement="bonus"**: Bonus increment (positive or negative) for Lone Wolf combat skill on this combat
* **enemyCombatSkillModifier="bonus"**: Absolute bonus (positive or negative) for the enemy combat skill on this combat
* **mindforceCS="-number"**: Bonus (negative) to the Lone Wolf combat skill due to the enemy Mindblast. It will not be applied if the player has Mindshield / Psi-screen
* **mindforceEP="-number"**: Endurance points lost by LW each turn, due to the enemy Mindblast. It will not be applied if the player has Mindshield / Psi-screen
* **noMindblast="true"**: The enemy is immune to Mindblast
Expand All @@ -412,7 +422,9 @@ the following properties:
* **mindblastMultiplier="float"**: CS multiplier to apply to Mindblast/Psi-Surge/Kai-Surge attacks this combat
* **psiSurgeBonus="number"**: Special CS bonus to apply for Psi-Surge discipline on this combat
* **kaiSurgeBonus="number"**: Special CS bonus to apply for Kai-Surge discipline on this combat
* **kaiSurgeTurnLoss="number"**: Special EP turn loss to apply for Kai/Psi-Surge discipline on this combat
* **noWeapon="boolean|number"**: If true, Lone Wolf cannot use any weapon on this combat. If a number, LW cannot use any weapon for that many turns
* **noObjectBonuses="true"**: If true, no weapon or item bonuses will be applied
* **mentalOnly="true"**: Lone Wolf cannot use any physical bonuses on this combat (any object bonus)
* **eludeTurn="number"**: Turn number after which LW can elude the combat
* **maxEludeTurn="number"**: Turn number after which LW cannot elude the combat anymore
Expand All @@ -431,6 +443,7 @@ the following properties:
* **disabledObjects="objectId1|objectId2|..."** Set objects that cannot be used on this combat. "none" to enable all objects previously disabled.
* **permanentDamage="boolean"** EP lost by LW on this combat will be permanent?
* **allowPotions="boolean"** Allow usage of potions prior the combat
* **fromSection="sectionId"** Imports the combat from another section to be continued in this section (currently only working for sections with 1 combat)

Different combat tags with different attributes are cumulative. Different combat tags with the same attribute will
replace that value. Ex:
Expand All @@ -446,6 +459,15 @@ replace that value. Ex:

The exception is "combatSkillModifierIncrement": It's always cumulative

### afterCombatTurn
```xml
<afterCombatTurn turn="1">
...
</afterCombatTurn>
```

Optional event handler to execute after a combat turn specified in the "turn" attribute.

### disableCombats
```xml
<disableCombats disabled="false" />
Expand Down Expand Up @@ -511,7 +533,7 @@ You can check if a global rule is still registered with:
</objectUsed>
```
Event handler for an object use. If some of the objects on the "objectId" property is used
on this section, the chilren rules will be executed
on this section, the children rules will be executed

### numberPicker / numberPickerChoosed
```xml
Expand Down Expand Up @@ -590,10 +612,10 @@ Changes the player current weapon to the set on "objectId" property

### toast
```xml
<toast text="Wrong number!" />
<toast text="Wrong number!" type="warning" />
<toast duration="10000" text="Because you possess..." />
```
Display a "toast" message. "duration" is the toast duration in milliseconds. It's optional, the default is 5000 ms
Display a "toast" message. "duration" is the toast duration in milliseconds. It's optional, the default is 5000 ms. "type" is the style of the toast (info, error, success, warning) and is optional, the default is info.

### textToChoice
```xml
Expand Down Expand Up @@ -641,6 +663,8 @@ The "toast" property is optional (default value="true"). If true, a toast will b

The "permanent" property is optional (default value="false"). If true, the endurance increase / decrease is permanent.

The "enemy" property is optional (defualt value="false"). If true the endurance increase / decrease applies to the current enemy

### combatSkill (has state)
```xml
<combatSkill count="-5" toast="false" />
Expand Down
2 changes: 1 addition & 1 deletion doc/README-objects.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Objects

This a brief of the objects descriptions. They are stored at objects.xml file.
General struture:
General structure:

```xml
<object-mechanics>
Expand Down
Loading

0 comments on commit 4630111

Please sign in to comment.