The end of the semester, basically. And really, I don't need a full game by then: just a working demo, pretty much. Of course, I'm really starting to enjoy this, and I think my friend and I developed a great story, so the project will probably continue on to become a full game, but at that point there won't be any pressure. The time limit basically just dictates that I have a working demo, so by the end of the semester I'll need to have the basic components. It shouldn't be too difficult. In fact, I'm already kind of figuring out how the magic works.
This is what I did to add a magic magic system. I've tested it, and it works. I suppose one could conceivably add status effects and elemental weaknesses and such. Here's what I've got. Of course any declaration under "init:" are not used, but whatever.
Code: Select all
init:
$ m = Character('Me', color="#c8c8ff")
label start:
label battleSetup:
$ enemyHP = 100
$ playerHP = 100
$ enemyATK = 20
$ enemyDEF = 5
$ playerATK = 20
$ playerDEF = 7
$ playerMP = 50
$ enemyMP = 50
$ playerMAG = 30
$ enemyMAG = 30
$ playerMAGDEF = 5
$ enemyMAGDEF = 5
$ fire = 5
$ potion = 10
$ grenade = 3
label battleLoop:
menu:
"What will you do? HP:%(playerHP)s/MP:%(playerMP)s ------ Enemy HP: %(enemyHP)s"
"ATTACK":
"You attack"
$ tempNumber = playerATK - enemyDEF
"You do %(tempNumber)s damage!"
$ enemyHP -= tempNumber
"Magic":
menu:
"Fire - 5":
$ fireATK = playerMAG - enemyMAGDEF
"You attack with fire for %(fireATK)s damage!"
$ enemyHP -= fireATK
$ playerMP -= 5
"Thunder - 5":
$ thunderATK = playerMAG - enemyMAGDEF
"You attack with thunder for %(thunderATK)s damage!"
$ enemyHP -= thunderATK
$ playerMP -= 5
"Use item":
menu:
"Potion %(potion)s" if potion > 0:
"You heal 50 hp!"
$ playerHP += 50
$ potion -= 1
"Grenade %(grenade)s" if grenade > 0:
$ grenATK = playerATK - enemyDEF + 10
"You throw grenade for %(grenATK)s damage!"
$ enemyHP -= grenATK
$ grenade -= 1
if enemyHP < 1:
"You win!"
jump endBattle
"You take damage!"
$ tempNumber = enemyATK - playerDEF
"Hit for %(tempNumber)s damage!"
$ playerHP -= tempNumber
if playerHP < 1:
jump loseBattle
jump battleLoop
label endBattle:
"You rock!"
return
label loseBattle:
"You're defeated!"
return
I also added some more displays, such as MP and enemy HP. As of right now, there's nothing to stop magic from being used after MP reaches zero, but that's actually part of a plan I have yet to implement. First I have to figure out how, lol. If you want to help, I'll welcome it, and I won't take up too much of your time. I also understand if you don't want to: it's fine.
~ If logic is nothing more than believing in fact, are we truly thinking logically or just blindly believing what seems to be true?