mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
* fix for bug 272, 176 and (probably) 273 (creatures cannot be attacked with catapult, position of explosion of catapult shot seems to be fixed for non 800x600 resolutions)
This commit is contained in:
@ -1020,8 +1020,8 @@ CShootingAnim::CShootingAnim(CBattleInterface * _owner, int attacker, int _dest,
|
||||
if(catapult) //catapult attack
|
||||
{
|
||||
owner->addNewAnim( new CSpellEffectAnim(owner, "SGEXPL.DEF",
|
||||
-130 + 22 * ( ((dest/BFIELD_WIDTH) + 1)%2 ) + 44 * (dest % BFIELD_WIDTH),
|
||||
-50 + 42 * (dest/BFIELD_WIDTH) ));
|
||||
-130 + 22 * ( ((dest/BFIELD_WIDTH) + 1)%2 ) + 44 * (dest % BFIELD_WIDTH) + owner->pos.x,
|
||||
-50 + 42 * (dest/BFIELD_WIDTH) + owner->pos.y ));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2833,6 +2833,9 @@ bool CGameState::battleCanShoot(int ID, int dest)
|
||||
if(our->hasFeatureOfType(StackFeature::FORGETFULL)) //forgetfulness
|
||||
return false;
|
||||
|
||||
if(our->creature->idNumber == 145 && dst) //catapult cannot attack creatures
|
||||
return false;
|
||||
|
||||
if(our->hasFeatureOfType(StackFeature::SHOOTER)//it's shooter
|
||||
&& our->owner != dst->owner
|
||||
&& dst->alive()
|
||||
|
Reference in New Issue
Block a user