Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/2137 #116

Merged
merged 4 commits into from Aug 29, 2015
Merged

Issue/2137 #116

merged 4 commits into from Aug 29, 2015

Conversation

DavidZeni
Copy link
Contributor

Fixes bug getting catapult action when hero has ballistics and no more target to shoot

@DjWarmonger
Copy link
Member

I believe Catapult should skip it's action if there are no walls left, no matter if player has Ballistics or not.

Also we can imagine hypothetical situation when there's Catapult with no related hero.

@DavidZeni
Copy link
Contributor Author

Ok, I'll check and refactor a bit all actions for catapult

No target -> Pass
No player or no ballistics -> automatic action
Else -> manual action
{
BattleAction attack;
attack.destinationTile = *RandomGeneratorUtil::nextItem(attackableBattleHexes, gs->getRandomGenerator());
attack.destinationTile = *RandomGeneratorUtil::nextItem(attackableBattleHexes,
gs->getRandomGenerator());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like bad formatting?

DjWarmonger pushed a commit that referenced this pull request Aug 29, 2015
Okay, thank you for your contribution :)
@DjWarmonger DjWarmonger merged commit a8c9727 into vcmi:develop Aug 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants