From 3f557369c7bbd08fdf2e6dbd9271873b20a9a144 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Sat, 24 May 2025 20:57:24 -0300 Subject: halfway of `map.cc` and start of `objects.cc` --- src/crcombat.cc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/crcombat.cc (limited to 'src/crcombat.cc') diff --git a/src/crcombat.cc b/src/crcombat.cc new file mode 100644 index 0000000..6b0df86 --- /dev/null +++ b/src/crcombat.cc @@ -0,0 +1,31 @@ +#include "creature.hh" + +TCombat::TCombat(void){ + this->Master = NULL; + this->EarliestAttackTime = 0; + this->EarliestDefendTime = 0; + this->LastDefendTime = 0; + this->LatestAttackTime = 0; + this->AttackMode = 2; + this->ChaseMode = 0; + this->SecureMode = 1; + this->AttackDest = 0; + this->Following; + this->Shield = NONE; + this->Close = NONE; + this->Missile = NONE; + this->Throw = NONE; + this->Wand = NONE; + this->Ammo = NONE; + this->Fist = false; + this->CombatDamage = 0; + this->ActCombatEntry = 0; + for(int i = 0; i < NARRAY(this->CombatList); i += 1){ + this->CombatList[i].ID = 0; + this->CombatList[i].Damage = 0; + this->CombatList[i].TimeStamp = 0; + } + this->LearningPoints = 0; +} + +// TODO(fusion): Probably better to figure out how Object work. -- cgit v1.2.3