mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
fixed manual control for arrow towers
This commit is contained in:
parent
bbc087b723
commit
31ca4db8bd
@ -579,6 +579,12 @@
|
||||
"type" : "MANUAL_CONTROL",
|
||||
"val" : 100,
|
||||
"valueType" : "BASE_NUMBER"
|
||||
},
|
||||
"ctrl2" : {
|
||||
"subtype" : "creature.arrowTower",
|
||||
"type" : "MANUAL_CONTROL",
|
||||
"val" : 100,
|
||||
"valueType" : "BASE_NUMBER"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5797,9 +5797,10 @@ void CGameHandler::runBattle()
|
||||
}
|
||||
|
||||
const CGHeroInstance * curOwner = battleGetOwnerHero(next);
|
||||
const int stackCreatureId = next->getCreature()->idNumber;
|
||||
|
||||
if ((next->position < 0 || next->getCreature()->idNumber == CreatureID::BALLISTA) //arrow turret or ballista
|
||||
&& (!curOwner || getRandomGenerator().nextInt(99) >= curOwner->valOfBonuses(Bonus::MANUAL_CONTROL, CreatureID::BALLISTA)))
|
||||
if ((stackCreatureId == CreatureID::ARROW_TOWERS || stackCreatureId == CreatureID::BALLISTA)
|
||||
&& (!curOwner || getRandomGenerator().nextInt(99) >= curOwner->valOfBonuses(Bonus::MANUAL_CONTROL, stackCreatureId)))
|
||||
{
|
||||
BattleAction attack;
|
||||
attack.actionType = Battle::SHOOT;
|
||||
|
Loading…
Reference in New Issue
Block a user