Code:
//Блок Проклятых минотавров
Magic->WriteLoHook(0x71C719, ModifyPartialBlock);
_int_ __stdcall ModifyPartialBlock(LoHook* h, HookContext* c)
{
int DamageType = IntAt(0x28326C0);
//Debug(DamageType != FireShieldDamage && DamageType != LightningStrike && DamageType != MoatDamage && DamageType != DeathRippleDamage);
if (DamageType != FireShieldDamage && DamageType != LightningStrike && DamageType != MoatDamage && DamageType != DeathRippleDamage)
{
//Debug(DamageType);
_BattleStack_ Defender = *(_BattleStack_*)IntAt(c->ebp + 8);
if (Randint(1, 100) <= 20 && (Defender.creature_id == DamnedMinotaur || Defender.creature_id == LegendaryMinotaur))
{
//Debug(DamageType);
IntAt(c->ebp - 8) = 50;
IntAt(c->ebp - 4) = 20;
//Debug(DamageType);
c->return_address = 0x71C89F;
return NO_EXEC_DEFAULT;
}
}
return EXEC_DEFAULT;
}