Weapons are essential elements in Cryptofights.
Our weapons are inspired in DnD (Dungeons and Dragons) core mechanics with a few twists.
This repo has folders for:
A few renders:
Both in DnD and in Cryptofights before you attack you perform an attack roll, meaning you roll a dice and factor in its outcome, to determine if you will hit your opponent.
In Cryptofights, if the outcome of that roll is higher than the opponent’s dodge score (derived from his agility), you hit your opponent.
The caveat is that one of your stats is added to this attack roll. The stat that is factored in depends on the type of weapon. Code:
attack_roll = hero.roll() + hero.get_attack_roll_type_bonus(weapon) attack_roll > opponent.dodge_score: process_hit()
These are the weapon properties influence this mechanic:
You need to be strong to hit your opponent with a Maul; therefore it is Brutal - uses strength:
To hit with a bow, you need to use your Agility; therefore it is Dextrous - uses agility:
Shortswords can either be used to deliver surgical strikes or with brute force, so they are Ambivalent - uses the highest stat: