{ (set: $pcHP to (random: 8,14)) (set: $pcAC to (random: 14,18)) (set: $pcAttackBonus to (random: 1,3)) (set: $pcDamageBonus to (random: 1,3)) (set: $monsterHP to (random: 8,14)) (set: $monsterAC to (random: 14,18)) (set: $monsterAttackBonus to (random: 1,3)) (set: $monsterDamageBonus to (random: 1,3)) (set: $monster to (either: "Goblin","Orc","Kobold")) } (display: "main")You have $pcHP HP and an AC of $pcAC. A hostile $monster approaches. It has $monsterHP HP and an AC of $monsterAC [[Attack]]{ (set: $pcAttackRoll to (random: 1,20)) (set: $pcAttackRollBonus to $pcAttackRoll + $pcAttackBonus) (set: $pcDamageRoll to (random: 1,8)) (set: $pcDamageRollBonus to $pcDamageRoll + $pcDamageBonus) (set: $pcDamageRollCrit to (random: 1,8)) (set: $monsterAttackRoll to (random: 1,20)) (set: $monsterAttackRollBonus to $monsterAttackRoll + $monsterAttackBonus) (set: $monsterDamageRoll to (random: 1,8)) (set: $monsterDamageRollBonus to $monsterDamageRoll + $monsterDamageBonus) (set: $monsterDamageRollCrit to (random: 1,8)) } You have $pcHP HP and an AC of $pcAC. The $monster has $monsterHP HP and an AC of $monsterAC. (if: $pcAttackRoll is 20)[{(set: $monsterHP to it - $pcDamageRoll + $pcDamageRollCrit)} You attack the $monster and, rolling a natural $pcAttackRoll, you do critical damage of $pcDamageRoll + $pcDamageRollCrit + $pcDamageBonus for a total of (print: $pcDamageRoll + $pcDamageRollCrit + $pcDamageBonus) points. It now has $monsterHP HP.] (else-if: $pcAttackRollBonus > $monsterAC)[{(set: $monsterHP to it - $pcDamageRollBonus)} You attack the $monster and, rolling a $pcAttackRollBonus ($pcAttackRoll+$pcAttackBonus), you do $pcDamageRollBonus points of damage ($pcDamageRoll+$pcDamageBonus). It now has $monsterHP HP.] (else:)[You roll a $pcAttackRollBonus ($pcAttackRoll+$pcAttackBonus) and miss the $monster.] (if: $monsterHP is <= 0)[The $monster's lifeless corpse crumples to the ground. You are victorious. Go home.] (else-if: $monsterAttackRoll is 20)[{(set: $pcHP to it - $monsterDamageRollBonus + $monsterDamageRollCrit)} The $monster strikes back, rolling a natural $monsterAttackRoll, it does critical damage of $monsterDamageRoll + $monsterDamageRollCrit + $monsterDamageBonus for a total of (print: $monsterDamageRoll + $monsterDamageRollCrit + $monsterDamageBonus) points. You now have $pcHP HP.)] (else-if: $monsterAttackRollBonus > $pcAC)[{(set: $pcHP to it - $monsterDamageRollBonus)} The $monster strikes back, rolling a $monsterAttackRollBonus ($monsterAttackRoll+$monsterAttackBonus), it does $monsterDamageRollBonus points of damage ($monsterDamageRoll+$monsterDamageBonus). You now have $pcHP HP.] (else:)[The $monster rolls a $monsterAttackRollBonus ($monsterAttackRoll+$monsterAttackBonus) and misses you.] (if: $pcHP is <= 0)[You are dead. Game over. [[Start over|init]]] (else-if: $monsterHP is <= 0)[[[Start over|init]]] (else:)[[[Attack again|Attack]]]