all repos — Legends-RPG @ 5be4e1fbe674ecf3bf038b8da84f5c49575d4c41

A fantasy mini-RPG built with Python and Pygame.

data/constants.py (view raw)

 1#Constants used throughout the game 
 2SCREEN_SIZE = (800, 608)
 3
 4##GAME STATES
 5
 6TOWN = 'town'
 7MAIN_MENU = 'main menu'
 8CASTLE = 'castle'
 9INN = 'Inn'
10POTION_SHOP = 'potion shop'
11ARMOR_SHOP = 'armor shop'
12WEAPON_SHOP = 'weapon shop'
13MAGIC_SHOP = 'magic shop'
14HOUSE = 'house'
15OVERWORLD = 'overworld'
16BROTHER_HOUSE = 'brotherhouse'
17BATTLE = 'battle'
18DUNGEON = 'dungeon'
19DUNGEON2 = 'dungeon2'
20DUNGEON3 = 'dungeon3'
21DUNGEON4 = 'dungeon4'
22DUNGEON5 = 'dungeon5'
23INSTRUCTIONS = 'instructions'
24DEATH_SCENE = 'death scene'
25LOADGAME = 'load game'
26CREDITS = 'credits'
27
28##Colors
29
30BLACK = 0, 0, 0
31NEAR_BLACK = 1, 0, 0
32WHITE = 255, 255, 255
33BLACK_BLUE = 19, 15, 48
34NEAR_BLACK_BLUE = 20, 15, 48
35LIGHT_BLUE = 0, 153, 204
36DARK_RED = 118, 27, 12
37REALLY_DARK_RED = 15, 0, 0
38RED = 255, 0, 0
39GREEN = 0, 255, 0
40PINK = 208, 32, 144
41TRANSITION_COLOR = BLACK_BLUE
42
43MAIN_FONT = 'alagard'
44
45#BATTLE STATES
46
47SELECT_ACTION = 'select action'
48SELECT_ENEMY = 'select enemy'
49ENEMY_ATTACK = 'enemy attack'
50SWITCH_ENEMY = 'switch enemy'
51PLAYER_ATTACK = 'player attack'
52SELECT_ITEM = 'select item'
53SELECT_MAGIC = 'select magic'
54RUN_AWAY = 'run_away'
55ATTACK_ANIMATION = 'attack animation'
56BATTLE_WON = 'battle won'
57ENEMY_DAMAGED = 'enemy damaged'
58ENEMY_DEAD = 'enemy dead'
59PLAYER_FINISHED_ATTACK = 'player finished attack'
60PLAYER_DAMAGED = 'enemy attack damage'
61DRINK_HEALING_POTION = 'drink healing potion'
62DRINK_ETHER_POTION = 'drink ether potion'
63CURE_SPELL = 'cure spell'
64FIRE_SPELL = 'fire spell'
65VICTORY_DANCE = 'victory dance'
66KNOCK_BACK = 'knock back'
67FLEE = 'flee'
68FADE_DEATH = 'fade death'
69SHOW_EXPERIENCE = 'show experience'
70LEVEL_UP = 'level up'
71TWO_ACTIONS = 'two actions'
72SHOW_GOLD = 'show gold'
73DEATH_FADE = 'death fade'
74
75#EVENTS
76
77END_BATTLE = 'end battle'
78
79#SOUND EFFECTS
80
81CLICK = 'click'
82CLICK2 = 'click2'
83CLOTH_BELT = 'cloth_belt'
84SWORD = 'sword'
85FIRE = 'fire'
86PUNCH = 'punch'
87POWERUP = 'powerup'
88TALK = 'talk'
89MISS = 'whoosh'
90
91TRANSITION_SPEED = 35 
92DEATH_TRANSITION_SPEED = 5
93
94#LEVEL STATES
95
96NORMAL = 'normal'
97TRANSITION_IN = 'transition in'
98TRANSITION_OUT = 'transition out'