Skip to content

Commit

Permalink
Update battle abilities and add battler stats documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryukh committed Mar 10, 2024
1 parent 20e5232 commit c4e3225
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 11 deletions.
5 changes: 3 additions & 2 deletions ccwbook/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ parts:
- file: parts/play/pets/timberwoof
- file: parts/play/pets/allycat
- file: parts/play/pets/hoverfish
- file: parts/play/monsters_intro
- file: parts/play/battle_abilities
- file: parts/play/battler_stats
sections:
- file: parts/play/battle_abilities
- caption: Code
chapters:
- file: parts/code/code_intro
Expand Down
156 changes: 147 additions & 9 deletions ccwbook/parts/play/battle_abilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Battle abilities are special moves that pets can use in combat. Pets get new abi

Abilities have duration, damage delivered delay, and cooldown. Ability parameters depends on the pet's stats and perks. You can read more about pets in the [Pets List](pet_list).

# Stats
### Stats

Attack abilities are scaled with the pet's Primary and Secondary stats. You can read more about stats in the *Stats Section (TBA)*

Expand All @@ -21,19 +21,157 @@ Attack abilities are scaled with the pet's Primary and Secondary stats. You can
**The basic attack ability. The pet attacks a single target.**

````{card} **Stats:**
- <font color='red'>Damage: `BASE_DAMAGE`</font>
- <font color='blue'>Cooldown: 0s</font>
- <font color='green'>Duration: `BASE_ATTACK_DURATION`</font>
- Range: Individually defined for each pet
- **Damage:** `BASE_DAMAGE`
- **Duration:** `BASE_ATTACK_DURATION`
- **Cooldown:** 0s
- **Range:** Individually defined for each pet
````

## `spin`

**The pet spins around, dealing damage to all nearby enemies.**

````{card} **Stats:**
- <font color='red'>Damage: `BASE_DAMAGE / 2`</font>
- <font color='blue'>Cooldown: `0` s</font>
- <font color='green'>Duration: `BASE_ATTACK_DURATION` </font>
- Range: `12` studs
- **Damage:** `BASE_DAMAGE / 2`
- **Duration:** `BASE_ATTACK_DURATION`
- **Cooldown:** `0` s
- **Range:** `12` studs
````

## `bite`

**The powerful bite attack.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 3`
- **Duration:** `MAX(0.4, BASE_ATTACK_DURATION / 2)`
- **Cooldown:** `BASE_ATTACK_DURATION * 2` s
- **Range:** `4` studs
````

## `clash`

** The pet quickly attacks the target several times.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 3`
- **Cooldown:** `BASE_ATTACK_DURATION * 1.5` s
- **Duration:** `BASE_ATTACK_DURATION * 1.5`
- **Range:** `3` studs
````


## `slam`

**The pet slams the ground, dealing damage to all nearby enemies.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 1.25`
- **Duration:** `BASE_ATTACK_DURATION * 1.5`
- **Cooldown:** `BASE_ATTACK_DURATION * 3` s
- **Range:** `15` studs
````

## `frostBite`

**The pet bites the target, dealing damage and slowing it down.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 1.5`
- **Duration:** `MAX(0.4, BASE_ATTACK_DURATION / 2)`
- **Cooldown:** `BASE_ATTACK_DURATION * 2` s
- **Range:** `4` studs
- **Effect:** Slows down the target by `50%` for `5` s
````

## `chillClash`

**The pet quickly attacks the target several times and reduces its attack damage.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 1.8`
- **Duration:** `BASE_ATTACK_DURATION * 1.5`
- **Cooldown:** `BASE_ATTACK_DURATION * 3` s
- **Range:** `3` studs
- **Effect:** Reduces the target's attack damage by `50%` for `5` s
````

## `frostSlam`

**The pet slams the ground, dealing damage to all nearby enemies and slowing them down.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 0.75`
- **Duration:** `BASE_ATTACK_DURATION * 1.5`
- **Cooldown:** `BASE_ATTACK_DURATION * 3` s
- **Range:** `15` studs
- **Effect:** Slows down the targets by `50%` for `5` s
````

## `bash`

**The pet bashes the target, dealing damage and (TO BE DEFINED).**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 3`
- **Duration:** BASE_ATTACK_DURATION`
- **Cooldown:** `BASE_ATTACK_DURATION * 2` s
- **Range:** `4` studs
````

## `poke`

**The pet pokes the target, dealing damage and (TO BE DEFINED).**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 3`
- **Duration:** BASE_ATTACK_DURATION * 1.5`
- **Cooldown:** `BASE_ATTACK_DURATION * 3` s
- **Range:** `6` studs
````

## `magicArrow`

**The pet shoots a magic arrow at the target, dealing damage and (TO BE DEFINED).**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 1.25`
- **Duration:** `BASE_ATTACK_DURATION * 1.5`
- **Cooldown:** `BASE_ATTACK_DURATION * 3` s
- **Range:** `30` studs
````

## `fireArrow`

**The pet shoots a fire arrow at the target, dealing fire damage.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 1.25`
- **Duration:** `BASE_ATTACK_DURATION * 1.5`
- **Cooldown:** `BASE_ATTACK_DURATION * 3` s
- **Range:** `30` studs
- **Element:** <font color='orange'>Fire
````

## `iceArrow`

**The pet shoots an ice arrow at the target, dealing ice damage.**

````{card} **Stats:**
- **Damage:** `BASE_DAMAGE * 1.25`
- **Duration:** `BASE_ATTACK_DURATION * 1.5`
- **Cooldown:** `BASE_ATTACK_DURATION * 3` s
- **Range:** `30` studs
- **Element:** <font color='blue'>Ice
````
19 changes: 19 additions & 0 deletions ccwbook/parts/play/battler_stats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Battler Stats

## Description

Battlers are the pets and monsters in CodeCombat Worlds. Each battler has its own unique set of stats and abilities. These stats and abilities are used to determine the outcome of battles and other interactions in the game.

## Primary Stats

The primary stats of a battler are:
- `STR` - Strength, which determines the damage dealt by the battler's attack abilities.
- `AGI` - Agility, which determines the battler's movement speed and attack speed.
- `END` - Endurance, which determines the battler's health and resistance to damage.

## Secondary Stats

- `BASE_DAMAGE` - the base damage of an attack ability. This is scaled with the battler's strength. The formula for calculating the damage of an attack ability is `SUM((STR - S) for S in RANGE(0, STR, 10))`.
- `BASE_ATTACK_DURATION` - the base duration of an attack ability. This is scaled with the battler's agility. The formula for calculating the duration of an attack ability is `MAX(0.5, 2 - (AGI - 10) / 40)`.
- `BASE_HEALTH` - the base/max health of a battler. This is scaled with the battler's endurance. The formula for calculating the health of a battler is `IF END < 10 then END * 10 ELSE (END - 10) * 20 + 100`.
- `MOVE_SPEED` - the movement speed of a battler. This is scaled with the battler's agility. The formula for calculating the movement speed of a battler is `20 + (AGI - 10) / 2`.

0 comments on commit c4e3225

Please sign in to comment.