Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1984

WML Workshop • simulate combat

$
0
0
Hi.
Any idea how to simulate combat for a specific weapon of the defender?
according to wiki:https://wiki.wesnoth.org/LuaAPI/wesnoth ... ate_combat
It should be like this... but that is not working.

Code:

$ _, _, attacker_stats, defender_stats =wesnoth.simulate_combat(attacker, defender, 1)$ defender_stats.number1.0$ _, _, attacker_stats, defender_stats =wesnoth.simulate_combat(attacker, defender, 2)$ defender_stats.number1.0

Statistics: Posted by ZombieKnight — Yesterday, 8:29 pm



Viewing all articles
Browse latest Browse all 1984

Trending Articles