Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEF SLIME_HP EQU 35
- DEF SLIME_ATK EQU 15
- DEF SLIME_DEF EQU 26
- DEF MIMIC_HP EQU 20
- DEF MIMIC_ATK EQU 21
- DEF MIMIC_DEF EQU 28
- DEF STAT$0 EQUS "HP"
- DEF STAT$1 EQUS "ATK"
- DEF STAT$2 EQUS "DEF"
- DEF NB_STATS EQU 3
- for stat, NB_STATS
- println STRFMT("Average {STAT{stat}} is %d", (SLIME_{STAT{stat}} + MIMIC_{STAT{stat}}) / 2)
- endr
- MACRO buff_monster
- REDEF monster EQUS STRUPR(STRSLICE("\1", 0, 1)) ++ STRLWR(STRSLICE("\1", 1))
- for stat, NB_STATS
- DEF buffed = \1_{STAT{stat}} * 120 / 100
- println "{monster}'s {STAT{stat}} went from {d:\1_{STAT{stat}}} to {d:buffed}!"
- endr
- ENDM
- buff_monster MIMIC
- buff_monster SLIME
Advertisement
Add Comment
Please, Sign In to add comment