mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-01 10:28:27 +02:00
95 lines
3.4 KiB
Python
95 lines
3.4 KiB
Python
from .features import Feature
|
||
from .. import (weapons, armor)
|
||
|
||
|
||
class UnarmoredDefenseMonk(Feature):
|
||
"""Beginning at 1st level, while you are wearing no armor and not wearing a
|
||
shield, your AC equals 10 + your Dexterity modifier + your Wisdom modifier.
|
||
|
||
This bonus is computed in the AC given on the Character Sheet above.
|
||
|
||
"""
|
||
name = "Unarmored Defense"
|
||
source = 'Monk'
|
||
|
||
|
||
class MartialArts(Feature):
|
||
"""At 1st level, your practice of martial arts gives you mastery of combat
|
||
styles that use unarmed strikes and monk weapons, which are shortswords and
|
||
any simple melee weapons that don’t have the two-handed or heavy
|
||
property. You gain the following benefits while you are unarmed or wielding
|
||
only monk weapons and you aren’t wearing armor or wielding a shield:
|
||
|
||
-- You can use Dexterity instead of Strength for the attack and damage rolls
|
||
of your unarmed strikes and monk weapons.
|
||
|
||
-- You can roll a d4 in place of the normal damage of your unarmed strike or
|
||
monk weapon. This die changes as you gain monk levels, as shown in the
|
||
Martial Arts column of the Monk table.
|
||
|
||
-- When you use the Attack action with an unarmed strike or a monk weapon on
|
||
your turn, you can make one unarmed strike as a bonus action. For example,
|
||
if you take the Attack action and attack with a quarter- staff, you can
|
||
also make an unarmed strike as a bonus action, assuming you haven't already
|
||
taken a bonus action this turn.
|
||
|
||
Certain monasteries use specializepd forms of the monk weapons. For
|
||
example, you might use a club that is two lengths of w ood connected by a
|
||
short chain (called a nunchaku) or a sickle with a shorter, straighter
|
||
blade (called a kama). Whatever name you use for a monk weapon, you can use
|
||
the game statistics provided for
|
||
|
||
"""
|
||
name = "Martial Arts"
|
||
source = 'Monk'
|
||
die = 'd4'
|
||
|
||
def weapon_func(self, weapon: weapons.Weapon, **kwargs):
|
||
"""
|
||
Update increasing damage dice and DEX mod of Monk weapons
|
||
"""
|
||
is_monk_weapon = any([isinstance(weapon, w)
|
||
for w in weapons.monk_weapons])
|
||
level = self.owner.Monk.level
|
||
if not is_monk_weapon:
|
||
return weapon
|
||
self.die = 'd4'
|
||
if level >= 5:
|
||
self.die = 'd6'
|
||
if level >= 11:
|
||
self.die = 'd8'
|
||
if level >= 17:
|
||
self.die = 'd10'
|
||
# check if new damage is better than default
|
||
if int(self.die[1:]) > int(weapon.base_damage.split('d')[-1]):
|
||
weapon.base_damage = '1' + str(self.die)
|
||
weapon.is_finesse = True
|
||
return weapon
|
||
|
||
|
||
class UnarmoredMovement(Feature):
|
||
"""Starting at 2nd level, your speed increases by 10 feet while you are not
|
||
wearing armor or wielding a shield. This bonus increases when you reach
|
||
certain monk levels, as shown in the Monk table.
|
||
|
||
At 9th level, you gain the ability to move along vertical surfaces and
|
||
across liquids on your turn without falling during the move.
|
||
|
||
"""
|
||
name = "Unarmored Movement"
|
||
source = "Monk"
|
||
|
||
@property
|
||
def speed_bonus(self):
|
||
level = self.owner.Monk.level
|
||
_speed_bonus = 10
|
||
if level >= 6:
|
||
_speed_bonus = 15
|
||
if level >= 10:
|
||
_speed_bonus = 20
|
||
if level >= 14:
|
||
_speed_bonus = 25
|
||
if level >= 18:
|
||
_speed_bonus = 30
|
||
return _speed_bonus
|