Cellar

The Cellar

Rarity’s first low level dungeon has been released;

Dungeon stats;

* 10 health
* Deals 2 damage per turn
* Has a to hit AC of 2
* Has a hit AC of 3

Can be completed once per day.

As **The Cellar** is an enclosed space it makes it difficult for ranged or spell combat, as such it is recommended for;

Barbarians, Fighters, and Paladin

It is recommended to first `scout(summoner)` the dungeon, to see if you will receive any rewards, if you do receive rewards, you can `adventure(summoner)`. The dungeon rewards `Crafting Materials (I)`, which is used in low level gear and potion crafting (released at level 3).

Recommended Attributes;

Strength, Dexterity, and Constitution.

Happy Adventuring!

**Technical**

The Cellar 0x2A0F1cB17680161cF255348dDFDeE94ea8Ca196A

`scout(summoner)`

`adventure(summoner)`

Github

## Explanation of Cellar's Formulas

### Dungeon Stats

```
Dungeon_Health = 10

```

```
Dungeon_Damage = 2

```

```
Dungeon_to_hit (chance that dungeon will hit you) = 3

```

```
Dungeon_Armor_Class = 2

```

### Formulas

#### Modifier for Attribute

```
modifier_for_attribute(attribute)

```

Modifier applies to which ever attribute in context. Example: If the use case is for strength, then `**attribute**` here refers to strength.

Modifier = (attribute - 10) / 2

**Note**: if attribute is 9 (ie. it causes the modifier result to be -0.5) then we round the modifier result to -1.

#### Total Health of Summoner

```
base_health = health_by_class + modifier_for_attribute(const)

```

```
health = base_health * level

```

(minimum base\_health is 1)

For example, if Level 2 Fighter has const of 16;

base\_health = 10 + ((16-10)/2) = 13

`health` = 13 \* 2 = 26

#### Total Attack Bonus of Summoner

```
attack_bonus = (level * attack_bonus_by_class/4 ) + modifier_for_attribute(str)

```

For example, if Level 2 Fighter has str of 16;

modifier\_for\_attribute(str) = (16-10)/2 = 3

`attack_bonus` = (2 \* 4/4) + 3 = 5

#### Armor Class of Summoner based on Dex

```
armor_class(dex) = modifier_for_attribute(dex)

```

For example, if Level 2 Fighter has dex 14;

modifier\_for\_attribute(dex) = (14-10)/2 = 2

### Calculations and Events for Engaging Dungeon

For simplicity and example sake, we assume we use a Level 2 Fighter with the following stats to engage the Dungeon in Cellar:

**Level 2 Fighter**

Str: 16

Dex: 14

Const: 16

Int: 10

Wisdom: 9

Charisma: 9

#### Variables Required

Basically, the following variables are required:

* `**health**` (final health points)
* `**dungeon\_health**` (10)
* `**damage**` (damage your summoner will inflict with 1 attack)
* `**\_to\_hit\_ac**` (whether you will get to hit the dungeon with your accuracy)
* `**\_hit\_ac**` (whether the dungeon will hit your summoner with its 'to\_hit' accuracy/chance)

#### Sequence of Events that will happen once Dungeon is engaged

So the a series of events will be checked inorder to determine how much reward is left on the table for claim and whether the dungeon is defeated.

Steps:

**1.** Check if you even get to hit/reach Dungeon with your skills with the formula:

```
_to_hit_ac: attack_bonus > dungeon_armor_class

```

if your attack\_bonus is greater than dungeon armor (2), then you get a chance to 'hit'/'reach'/'touch' the dungeon.

For our example Fighter, `_to_hit_ac` checks whether 5 > 2 is true. Hence he/she passed the accuracy check and can be able to 'hit' the Dungeon.

**2.** Now the reward (10 crafting mats) is put on the table. You try to hit the dungeon each time. If you manage to 'kill' the dungeon with one attack (one attack is the amount of `damage` your summoner gives, dungeon has 10 health), then you can claim all the remaining rewards on the table.

```
damage: modifier_for_attribute(str)

```

(minimum damage is 1)

For our example Fighter, `damage` = (16 - 10)/2 => 3

So he choke slams the Dungeon and Dungeons remaining health is 10 -3 => 7 (Dungeon not defeated yet)

3. If you did not kill the dungeon with your last attack, the dungeon gets to try to attack your summoner and 1 reward is removed from the table.
For our example Fighter, he now can only claim 10-1=>9 reward.
- 3a. Dungeon first checks if its accuracy is enough to 'hit'/reach you with the formula:

```
_hit_ac : armor_class(dex) < dungeon_to_hit

```

For our example Fighter, we check if 2 < 3 is true. Hence Dungeon gets to 'hit'/reach Figther.

- 3b. If your armor class is below dungeon\_to\_hit, then we move to calculate how much health you have left after dungeon hits you:

```
remaining_health: original_health - dungeon_damage

```

For our example Fighter, `remaining_health` = 26 - 2 = 24. And we are still alive!

4. If your health falls to 0 or below, you loose.

5. If you are still alive after dungeon attacks you, you will try to 'hit'/attack the dungeon again (ie, go to step 2) until you can take away its remaing health.

6. If you manage to 'kill' the dungeon before the reward runs out, you can claim the remaining rewards.

So for our example Fighter, we did not kill the Dungeon in first try, so we try again with 9 rewards left.

2nd try: 9 rewards, dungeon\_health=7

3rd try: 8 rewards, dungeon\_health=4

4th try: 7 rewards, dungeon\_health=1, then we inflict damage of 3 one last time and Dungeon defeated.

Hence we claim 7 crafting mats!

(Play Final Fantasy VII celebratory music in background.)