Forgot to check in the actual player types.

This commit is contained in:
Martin Haye 2015-09-19 08:30:52 -07:00
parent 698ce413cc
commit bd0426e622
3 changed files with 173 additions and 0 deletions

View File

@ -0,0 +1,130 @@
const TYPE_PLAYER = $81
struc Player
byte t_type
word p_nextObj
word s_name
// Innate attributes
byte b_intelligence
byte b_strength
byte b_agility
byte b_bravery
byte b_health
byte b_charisma
byte b_spirit
// Calculated attributes
byte b_armor
// Basic skills
byte b_aiming
byte b_dodging
byte b_wilderness
// Lists
word p_skills // list:Modifier
word p_items // list:Item
word p_buffs // list:TempModifier
word p_debuffs // list:TempModifier
end
// Combat skills, weapon modifiers, etc.
const TYPE_MODIFIER = $82
struc Modifier
byte t_type
word p_nextObj
byte b_modKind
byte b_modValue
end
const TYPE_TEMP_MODIFIER = $83
struc TempModifier
byte t_type
word p_nextObj
byte b_modKind
byte b_modValue
word s_tempModDescrip
word w_endTurn
end
const TYPE_ITEM = $84
struc Item
byte t_type
word p_nextObj
word s_name
byte b_itemKind
word w_cost
word p_itemModifiers
end
const WEAPON_FLAG_SINGLE_USE = $01
const WEAPON_FLAG_WHOLE_GROUP = $02
const TYPE_WEAPON = $85
struc Weapon
// General item properties
byte t_type
word p_nextObj
word s_name
byte b_itemKind
word w_cost
word p_itemModifiers
// Usables properties
byte b_maxUses
byte b_curUses
// Weapon properties
byte b_weaponFlags
byte b_ammoKind
byte b_clipSize
byte b_clipCurrent
word r_meleeDmg // 3 hex digits: num dice, die size, add. E.g. $361 = 3d6+1
word r_projectileDmg // ditto
byte ba_attacks[3] // each is: 0=none, 1=single, 2=double, 3+ = multi-shot
byte b_range
word s_combatText
end
const TYPE_ARMOR = $87
struc Armor
// General item properties
byte t_type
word p_nextObj
word s_name
byte b_itemKind
word w_cost
word p_itemModifiers
// Usables properties
byte b_maxUses
byte b_curUses
// Armor properties
byte armorValue
byte maxUses
byte curUses
end
// Countable things, e.g. ammo and pelts
const TYPE_STUFF = $88
struc Stuff
// General item properties
byte t_type
word p_nextObj
word s_name
byte b_itemKind
word w_cost
word p_itemModifiers
// Stuff properties
word count
word maxCount
end
const TYPE_ENEMY = $89
struc Enemy
byte t_type
word p_nextObj
word s_name
byte ba_images[2]
word w_hitPoints
byte b_hitBonus
byte b_attackType // 1=melee, 2=projectile
word s_attackText
end

View File

@ -0,0 +1,6 @@
def new_Player_Hue_Hauser
word p
p = mmgr(HEAP_ALLOC, TYPE_PLAYER)
p=>s_name = mmgr(HEAP_INTERN, "Hue Hauser")
end

View File

@ -0,0 +1,37 @@
// Hints so the heap management code knows how to traverse the structures
byte typeTbl_Player[] = Player, p_nextObj, s_name, p_skills, p_items, p_buffs, p_debuffs, 0
byte typeTbl_Modifier[] = Modifier, p_nextObj, 0
byte typeTbl_TempModifier[] = TempModifier, p_nextObj, s_tempModDescrip, 0
byte typeTbl_Item[] = Item, p_nextObj, s_name, p_itemModifiers, 0
// Weapon kinds
byte[] kind_bow = "bow(s)"
byte[] kind_blade = "blade(s)"
byte[] kind_explosive = "explosive(s)"
byte[] kind_handgun = "handgun(s)"
byte[] kind_hand_to_hand = "hand to hand"
byte[] kind_rifle = "rifle(s)"
byte[] kind_throwing = "throwing"
// Skill kinds
byte[] kind_mining = "mining"
byte[] kind_native_bond = "native bond"
byte[] kind_pyre_ware = "pyre ware"
// Ammo kinds
byte[] kind_bullet = "bullet(s)"
byte[] kind_arrow = "arrow(s)"
byte[] kind_buck = "buck"
byte[] kind_quarrel = "quarrel(s)"
// Armor kinds
byte[] kind_shoes = "shoes"
byte[] kind_coat = "coat(s)"
byte[] kind_hat = "hat(s)"
byte[] kind_pants = "pants"
byte[] kind_shirt = "shirt(s)"
byte[] kind_gloves = "gloves"
byte[] kind_shield = "shield(s)"
// Text table for translating a kind to a string
//word[] kinds = kind_bow, kind_blade, kind_explosive, kind_handgun, kind_hand_to_hand, kind_rifle, kind_throwing
//word = kind_mining, kind_native_bond, kind_pyre_ware
//word = kind_bullet, kind_arrow, kind_buck, kind_quarrel
//word = kind_shoes, kind_coat, kind_hat, kind_pants, kind_shirt, kind_gloves, kind_shield