| import random |
|
|
| from nodes import Node |
| from utils import * |
|
|
| EVENTS = [ |
| Node( |
| "Dungeon Entrance", |
| "A massive gate blocks the dungeon. A stone guardian awakens and says: 'Only those with strength may enter. What will you do to pass through it? \n\nAttack with sword, or magic, or even BRIDE it?", |
| ['pics/0.png'], |
| { |
| PHYSICAL_ATTACK: [(minus_attribute, 'hp', 20)], |
| MAGICAL_ATTACK: [(minus_attribute, 'mp', 20)], |
| SPEND_MONEY: [(minus_attribute, 'coin', 30)] |
| }, |
| { |
| PHYSICAL_ATTACK: 2, |
| MAGICAL_ATTACK: 3, |
| SPEND_MONEY: 4, |
| LEAVE: -1 |
| }, |
| default = random.randint(2, 4) |
| ), |
| Node( |
| "Injured Warrior", |
| "Inside the dungeon, you find a dying warrior. He carries a rare potion. What will you do? \n\nHelp Him, or Attack Him?", |
| ['pics/1.png'], |
| { |
| PHYSICAL_REFILL: [(add_attribute, 'hp', 5)], |
| PHYSICAL_ATTACK: [(minus_attribute, 'hp', 5)], |
| MAGICAL_ATTACK: [(minus_attribute, 'mp', 5)], |
| }, |
| { |
| PHYSICAL_REFILL: 5, |
| PHYSICAL_ATTACK: 5, |
| MAGICAL_ATTACK: 5, |
| LEAVE: -1 |
| }, |
| default = 5 |
| ), |
| Node( |
| "Magic Altar", |
| "A mysterious altar offers power. What will you do? \n\nAttack this altar or Refill your stamina here?", |
| ['pics/2.png'], |
| { |
| MAGICAL_REFILL: [(add_attribute, 'mp', 10), (minus_attribute, "hp", 5)], |
| PHYSICAL_ATTACK: [(minus_attribute, 'hp', 15)], |
| PHYSICAL_REFILL: [(add_attribute, 'hp', 10)] |
| }, |
| { |
| MAGICAL_REFILL: 5, |
| PHYSICAL_ATTACK: 5, |
| }, |
| default = 5 |
| ), |
| Node( |
| "Merchant Room", |
| "A merchant appears and says: 'I trade only with survivors.' What will you do? \n\nSpend money, or Rob him?", |
| ['pics/3.png'], |
| { |
| PHYSICAL_ATTACK: [(minus_attribute, "hp", 15), (add_attribute, 'coun', 10)], |
| MAGICAL_ATTACK: [(minus_attribute, 'mp', 10), (add_attribute, 'coin', 10)], |
| SPEND_MONEY: [(minus_attribute, 'coin', 25), (add_attribute, 'mp', 5), (add_attribute, 'hp', 5)], |
| }, |
| { |
| PHYSICAL_ATTACK: 5, |
| MAGICAL_ATTACK: 5, |
| MAGICAL_REFILL: 5, |
| SPEND_MONEY: 5, |
| EARN_MONEY: 5, |
| }, |
| default = 5 |
| ), |
| Node( |
| "Underground Lake", |
| "A giant monster blocks the way. What will you do? \n\nAttack or Run?", |
| ['pics/4.png'], |
| { |
| PHYSICAL_ATTACK: [(minus_attribute, "hp", 30)], |
| MAGICAL_ATTACK: [(minus_attribute, 'mp', 20)], |
| LEAVE: [(minus_attribute, 'hp', 10)], |
| }, |
| { |
| PHYSICAL_ATTACK: 6, |
| MAGICAL_ATTACK: 7, |
| LEAVE: 8, |
| }, |
| default = random.randint(6, 8) |
| ), |
| Node( |
| "Ancient Library", |
| "You find dragon history. What will you do? \n\nDestroy, or Rest, or Buy Weapon?", |
| ['pics/5.png', 'pics/origin.png'], |
| { |
| PHYSICAL_REFILL: [(add_attribute, "hp", 10)], |
| MAGICAL_REFILL: [(add_attribute, 'mp', 10)], |
| EARN_MONEY: [(add_attribute, 'coin', 20)], |
| MAGICAL_ATTACK: [(minus_attribute, 'mp', 15)] |
| }, |
| { |
| PHYSICAL_REFILL: 9, |
| MAGICAL_REFILL: 9, |
| EARN_MONEY: 9, |
| }, |
| default = 9 |
| ), |
| Node( |
| "Dragon Prison", |
| "A baby dragon is trapped. It is telling you the ORIGIN of DRAGON. What will you do? \n\nAttack, or Run, or Rescue?", |
| ['pics/6.png', 'pics/origin.png'], |
| { |
| PHYSICAL_ATTACK: [(minus_attribute, "hp", 30)], |
| MAGICAL_ATTACK: [(minus_attribute, 'mp', 20)], |
| LEAVE: [(minus_attribute, 'hp', 10)], |
| }, |
| { |
| PHYSICAL_REFILL: 9, |
| MAGICAL_REFILL: 9, |
| EARN_MONEY: 9, |
| }, |
| default = 9 |
| ), |
| Node( |
| "Dark Corridor", |
| "A shadow creature attacks. Its attack is fierce and fast. What will you do? \n\nFight back, or Run away?", |
| ['pics/7.png'], |
| { |
| PHYSICAL_ATTACK: [(minus_attribute, "hp", 45), (add_attribute, 'coin', 30)], |
| MAGICAL_ATTACK: [(minus_attribute, "mp", 35), (add_attribute, 'coin', 30)], |
| LEAVE: [(minus_attribute, 'hp', 20), (minus_attribute, 'mp', 20), (minus_attribute, 'coin', 20)] |
| }, |
| { |
| PHYSICAL_ATTACK: 9, |
| MAGICAL_ATTACK: 9, |
| LEAVE: 9 |
| }, |
| default = 9 |
| ), |
| Node( |
| "Dragon Chamber", |
| "The ancient dragon wakes. Its eyes glow in the darkness. 'Another adventurer seeking my treasure?' What will you do?\n\nAttack and Rescue, or Run away?", |
| ['pics/8.png'], |
| { |
| PHYSICAL_ATTACK: [(minus_attribute, "hp", 30), (add_attribute, 'coin', 50)], |
| MAGICAL_ATTACK: [(minus_attribute, "mp", 25), (add_attribute, 'coin', 50)], |
| LEAVE: [(minus_attribute, 'hp', 15), (minus_attribute, 'mp', 15), (minus_attribute, 'coin', 15)] |
| }, |
| route=check_ending |
| ), |
| Node("Perfect Victory", "You defeat the dragon without losing yourself. The dungeon recognizes you as the true successor.", ['pics/E1.png']), |
| Node("Exhausted Victory", "You defeat the dragon, but the battle drains every last bit of your power.", ['pics/E2.png']), |
| Node("You Survive", "You barely survive, but you lost everything", ['pics/E3.png']), |
| Node("Tyrant Ending", "Player seizes the dragon's power. Becomes the next monster.", ['pics/E4.png']), |
| Node("Game Over", "You have lost everything and this game", ['pics/E5.png']) |
| ] |