Is there some way to compare attributes in terms of less than, greater than, and equal to?
I'm trying to implement a very simple combat system.
Cheers,
Jim
var randomnumber = function rng(min, max) {
return Math.floor(Math.random() * (max - min) + min);
}
set ("Monsterhit", randomnumber(1,6));
The monster atttacks with {Monsterhit}
[[strike back]](PCtohit)
[[PCtohit]]:
var randomnumber = function rng(min, max) {
return Math.floor(Math.random() * (max - min) + min);
}
set ("PChit", randomnumber(1,6));
You counter with {PChit}
[[result]](result)
[[result]]:
{if PChit > Monsterhit: You strike the monster}
{if PChit < Monsterhit: The monster strkes you}
{if PChit == Mosterhit: This round is a draw}