Skip to content

Commit

Permalink
Merge pull request OpenDominion#585 from internetfett/bugfix/spell_cost
Browse files Browse the repository at this point in the history
Fix spell action service mana cost
  • Loading branch information
WaveHack committed Jun 27, 2019
2 parents 3982dcd + cb7402b commit d30d3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/Dominion/Actions/SpellActionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function castSpell(Dominion $dominion, string $spellKey, ?Dominion $targe
throw new RuntimeException("Your wizards to not have enough strength to cast {$spellInfo['name']}.");
}

$manaCost = ($spellInfo['mana_cost'] * $this->landCalculator->getTotalLand($dominion));
$manaCost = $this->spellCalculator->getManaCost($dominion, $spellKey);

if ($dominion->resource_mana < $manaCost) {
throw new RuntimeException("You do not have enough mana to cast {$spellInfo['name']}.");
Expand Down

0 comments on commit d30d3a0

Please sign in to comment.