BattleAction::Parry
execution block should set player.parry = true
so they are defending (parrying). BattleAction::Guardbreak
execution block should set enemy.parry = false;
and its success log should be success: !enemy.parry,
since it breaks the enemy defense/parrying
#68
here in the code https://github.com/ImpulseDAO/Vara-Arena/blob/master/contracts/arena/src/battle.rs#L200
it shows what happens to a players battle action if their enemy has cast a fire_haste or chilling_touch spell on them.
if the player has been affected by the fire_haste spell, their fire_haste value of 0 is set to 4 and decrements back down to 0 each turn. if they are affected by that spell where fire_haste > 0 - that increases the modifier, which increases more the more intelligence they have
if the player has been affected by chilling_touch, their chilling_touch value of 0 is set to 4 and decrements back down to 0 each turn. if they are affected by that spell where chilling_touch > 0 - that decreases the modifier, which decreases more the more intelligence they have
basically that modifier output value is the output of combining the impacts of the above spells, and is used to affect that players battle action.
then if the player character has config attributes of
disable_agiim = true
, which requires theirparry = true
(defending themselves) to be set first, then the fire_haste and chilling_touch spells have no further impact on their battle action against the enemy.but if the player character has config attributes of
disable_agiim = false
(not defending themselves), the intensity of the battle action undertaken by the player is changed by the modifier output value (more if the player has a higher agility), so in that case a:base_initiative - (u16::from(player.attributes.agility) * modifier)
, where themodifier
is a negative number, so subtracting a negative modifier results in an increase (x - (y * -z)) = (x - (-yz)). so i don't think the chilling_touch spell makes sense, why would you cast a chilling_touch spell on an enemy if it actually increases the impact of their battle action? shouldn't it decrease the impact of their battle action instead?the player and enemy each have an attribute
parry = false
set by default.and the only way the player or enemy can have their default
disable_agiim = false
changed todisable_agiim = true
seems to be by somehow changing their attribute toparry = true
.note that parry is in the dictionary, it means "deflect or ward off a thrust or blow, evade, or avoid".
for the player or enemy to parry (defensive battle action), the player or enemy would have to run the
BattleAction::Parry
on themselves.BattleAction::Parry
is defined here https://github.com/ImpulseDAO/Vara-Arena/blob/master/contracts/arena/src/execute.rs#L216, but i think we need to add a new line of codeplayer.parry = true
below that line for it to work.then the opponent would have to run the
BattleAction::Guardbreak
to break that player's defense, which first checks ifenemy.parry
is true (if they are defending themselves) and then setsenemy.disable_agiim = true;
,but i also think Guardbreak should reset the enemy parry value back to its default of not defending
enemy.parry = false;
here https://github.com/ImpulseDAO/Vara-Arena/blob/master/contracts/arena/src/execute.rs#L234C21-L234C48 since the just broke their defence, and;i also think the success log here https://github.com/ImpulseDAO/Vara-Arena/blob/master/contracts/arena/src/execute.rs#L239 should be changed to
success: !enemy.parry,
, since success is when the enemy isn't parrying anymore since we broke their defense.but i don't actually know what
agiim
is an abbreviation for... so maybe theBattleAction::Parry
should actually have an extra line to setplayer.disable_agiim = true
too, and thenBattleAction::Guardbreak
would actually setenemy.disable_agiim = false;
(back to default value) instead ofenemy.disable_agiim = true;
so they can be impacted by those spells.we'd also need
pub struct CharacterState {
to includeparry: boolean
The text was updated successfully, but these errors were encountered: