Level: 5 | EXP: 125/300 HP: 45/50 | MP: 20/20 Gold: 150 G | Location: Sleepy Village
Item | Qty | Desc |
---|---|---|
POTION |
3 | Restores 20 HP |
ETHER |
1 | Restores 10 MP |
SWORD |
1 | Basic Iron Sword |
SHIELD |
1 | Wooden Shield |
SLIME_JELLY |
5 | Gooey, but maybe useful? |
KEY |
1 | Rusty Key from Cave |
<span class="code-line">-- Player attack function</span>
<span class="code-line">function player_attack(target)</span>
<span class="code-line"> local damage = player.strength + player.weapon.attack</span>
<span class="code-line"> damage = damage - target.defense</span>
<span class="code-line"> if damage < 1 then damage = 1 end</span>
<span class="code-line"> target.hp = target.hp - damage</span>
<span class="code-line"> print(player.name .. " attacks " .. target.name .. "! Deals " .. damage .. " DMG!")</span>
<span class="code-line">end</span>
Remember to save your game often at the Inn! The Slime King is tough!
This document was styled using the pixel-art
theme with stylemd
. Get the tool here: https://github.com/ddukbg/stylemd