[wesnoth-commits] [wesnoth/wesnoth] 782f9c: add attacker and defender variables in ability for...
gfgtdf
noreply at github.com
Sun May 3 16:32:11 UTC 2020
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 782f9ca98a7c40f8705aad795ce8d2fa62db261a
https://github.com/wesnoth/wesnoth/commit/782f9ca98a7c40f8705aad795ce8d2fa62db261a
Author: gfgtdf <daniel.gfgtdf at gmail.com>
Date: 2020-05-03 (Sun, 03 May 2020)
Changed paths:
M src/actions/attack.cpp
M src/units/abilities.cpp
M src/units/abilities.hpp
M src/units/attack_type.hpp
Log Message:
-----------
add attacker and defender variables in ability formulas
Now formulas like "add=(attacker.level - defender.level)"
are possible in weapon specials that allow the author to compute
the abilities value based on the opponent. The main reason why i
choose for attacker/defender instead of self/opponent was thats
is easier to implement. (but using the self/student variable is
also possible to get a 'opponent' variable shoudl that be needed)
Also it is less ambiguous than 'self/opponent' in the case of
weapon specials that come from leadership-like abilities.
More information about the Commits
mailing list