mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 02:31:00 +00:00
tfv: add magic points
This commit is contained in:
parent
e9150857c2
commit
2df833b737
@ -12,7 +12,8 @@
|
||||
|
||||
/* stats */
|
||||
unsigned char level=0;
|
||||
unsigned char hp=50,max_hp=100;
|
||||
unsigned char hp=100,max_hp=100;
|
||||
unsigned char mp=50,max_mp=50;
|
||||
unsigned char limit=2;
|
||||
unsigned char money=0,experience=0;
|
||||
unsigned char time_hours=0,time_minutes=0;
|
||||
|
@ -23,7 +23,7 @@
|
||||
Plain Fish BUBBLE FIRE ICE
|
||||
|
||||
Evil Tree RND-16 LEAVE FIRE ICE
|
||||
Wood Elf SING MALAISE FIRE
|
||||
Wood Elf SING MALAISE BOLT
|
||||
|
||||
Giant Bee RND-64 BUZZSAW ICE NONE
|
||||
Procrastinon RND-32 PUTOFF NONE MALAISE
|
||||
@ -42,6 +42,7 @@ Forest? Grassland? Artic? Ocean?
|
||||
SUMMONS -> METROCAT
|
||||
MAGIC -> HEAL FIRE
|
||||
ICE MALAISE
|
||||
BOLT
|
||||
LIMIT -> SLICE ZAP
|
||||
DROP
|
||||
|
||||
@ -75,6 +76,7 @@ List hits
|
||||
#define MAGIC_FIRE 1
|
||||
#define MAGIC_ICE 2
|
||||
#define MAGIC_MALAISE 4
|
||||
#define MAGIC_BOLT 8
|
||||
|
||||
struct enemy_type {
|
||||
char *name;
|
||||
@ -94,6 +96,69 @@ static struct enemy_type enemies[8]={
|
||||
.resist=MAGIC_FIRE,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
[1]= {
|
||||
.name="Plain Fish",
|
||||
.hp_base=10,
|
||||
.hp_mask=0x1f,
|
||||
.attack_name="Bubble",
|
||||
.weakness=MAGIC_FIRE,
|
||||
.resist=MAGIC_ICE,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
[2]= {
|
||||
.name="Evil Tree",
|
||||
.hp_base=10,
|
||||
.hp_mask=0x1f,
|
||||
.attack_name="Leaves",
|
||||
.weakness=MAGIC_FIRE,
|
||||
.resist=MAGIC_ICE,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
[3]= {
|
||||
.name="Wood Elf",
|
||||
.hp_base=10,
|
||||
.hp_mask=0x1f,
|
||||
.attack_name="Song",
|
||||
.weakness=MAGIC_MALAISE,
|
||||
.resist=MAGIC_BOLT,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
[4]= {
|
||||
.name="Giant Bee",
|
||||
.hp_base=10,
|
||||
.hp_mask=0x1f,
|
||||
.attack_name="Buzzsaw",
|
||||
.weakness=MAGIC_ICE,
|
||||
.resist=MAGIC_NONE,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
[5]= {
|
||||
.name="Procrastinon",
|
||||
.hp_base=10,
|
||||
.hp_mask=0x1f,
|
||||
.attack_name="Putoff",
|
||||
.weakness=MAGIC_NONE,
|
||||
.resist=MAGIC_MALAISE,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
[6]= {
|
||||
.name="Ice Fish",
|
||||
.hp_base=10,
|
||||
.hp_mask=0x1f,
|
||||
.attack_name="Auger",
|
||||
.weakness=MAGIC_FIRE,
|
||||
.resist=MAGIC_ICE,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
[7]= {
|
||||
.name="Evil Penguin",
|
||||
.hp_base=10,
|
||||
.hp_mask=0x1f,
|
||||
.attack_name="Waddle",
|
||||
.weakness=MAGIC_FIRE,
|
||||
.resist=MAGIC_ICE,
|
||||
.sprite=killer_crab,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
@ -121,7 +121,10 @@ void print_info(void) {
|
||||
|
||||
basic_htab(23);
|
||||
basic_vtab(7);
|
||||
basic_print("MP: 0/0");
|
||||
basic_print("MP: ");
|
||||
print_u8(mp);
|
||||
basic_print("/");
|
||||
print_u8(max_mp);
|
||||
|
||||
basic_htab(23);
|
||||
basic_vtab(9);
|
||||
|
75
gr-sim/tfv/tfv_zp.h
Normal file
75
gr-sim/tfv/tfv_zp.h
Normal file
@ -0,0 +1,75 @@
|
||||
/* Page Zero */
|
||||
|
||||
#define COLOR1 0x00
|
||||
#define COLOR2 0x01
|
||||
#define MATCH 0x02
|
||||
#define XX 0x03
|
||||
#define YY 0x04
|
||||
#define YADD 0x05
|
||||
#define LOOP 0x06
|
||||
#define MEMPTRL 0x07
|
||||
#define MEMPTRH 0x08
|
||||
#define DISP_PAGE 0x09
|
||||
#define DRAW_PAGE 0x0a
|
||||
#define TEMPY 0xfb
|
||||
#define OUTL 0xfe
|
||||
#define OUTH 0xff
|
||||
|
||||
/* Zero page addresses */
|
||||
#define WNDLFT 0x20
|
||||
#define WNDWDTH 0x21
|
||||
#define WNDTOP 0x22
|
||||
#define WNDBTM 0x23
|
||||
#define CH 0x24
|
||||
#define CV 0x25
|
||||
#define GBASL 0x26
|
||||
#define GBASH 0x27
|
||||
#define BASL 0x28
|
||||
#define BASH 0x29
|
||||
#define BAS2L 0x2A
|
||||
#define BAS2H 0x2B
|
||||
#define H2 0x2C
|
||||
#define V2 0x2D
|
||||
#define MASK 0x2E
|
||||
#define COLOR 0x30
|
||||
#define INVFLG 0x32
|
||||
#define YSAV 0x34
|
||||
#define YSAV1 0x35
|
||||
#define CSWL 0x36
|
||||
#define CSWH 0x37
|
||||
|
||||
|
||||
|
||||
/* stats */
|
||||
extern unsigned char level;
|
||||
extern unsigned char hp,max_hp;
|
||||
extern unsigned char mp,max_mp;
|
||||
extern unsigned char limit;
|
||||
extern unsigned char money,experience;
|
||||
extern unsigned char time_hours,time_minutes;
|
||||
extern unsigned char items1,items2;
|
||||
extern unsigned char steps;
|
||||
|
||||
|
||||
struct fixed_type {
|
||||
char i;
|
||||
unsigned char f;
|
||||
};
|
||||
|
||||
int opening(void);
|
||||
int title(void);
|
||||
int flying(void);
|
||||
|
||||
void game_over(void);
|
||||
void show_map(void);
|
||||
void print_info(void);
|
||||
void print_help(void);
|
||||
|
||||
int name_screen(void);
|
||||
|
||||
int do_battle(void);
|
||||
|
||||
int world_map(void);
|
||||
|
||||
int city_map(void);
|
||||
|
Loading…
Reference in New Issue
Block a user