ITEM(sunsword, meleeweapon) { }; ITEM(rescuethepeasant, meleeweapon) { }; ITEM(vormav, meleeweapon) { }; ITEM(cronus, meleeweapon) { }; ITEM(defender, meleeweapon) { }; ITEM(aethier, meleeweapon) { }; ITEM(aegis, shield) { }; ITEM(phoenixshield, shield) { }; ITEM(belderiver, meleeweapon) { public: virtual truth AllowAlphaEverywhere() const { return true; } protected: virtual int GetClassAnimationFrames() const { return 32; } virtual col16 GetOutlineColor(int) const; virtual alpha GetOutlineAlpha(int) const; }; ITEM(loricatushammer, meleeweapon) { public: virtual truth AllowAlphaEverywhere() const { return true; } protected: virtual int GetClassAnimationFrames() const { return 32; } virtual col16 GetOutlineColor(int) const; virtual alpha GetOutlineAlpha(int) const; }; ITEM(goldenjaguarshirt, bodyarmor) { public: virtual truth IsConsumable() const { return false; } virtual truth AllowAlphaEverywhere() const { return true; } protected: virtual int GetClassAnimationFrames() const { return 32; } virtual col16 GetOutlineColor(int) const; virtual alpha GetOutlineAlpha(int) const; }; ITEM(demonhead, meleeweapon) { public: virtual truth AllowAlphaEverywhere() const { return true; } protected: virtual int GetClassAnimationFrames() const { return 32; } virtual col16 GetOutlineColor(int) const; virtual alpha GetOutlineAlpha(int) const; }; ITEM(smite, meleeweapon) { public: virtual truth HitEffect(character*, character*, v2, int, int, truth); virtual int GetSpecialFlags() const; virtual truth ReceiveDamage(character*, int, int, int); }; ITEM(muramasa, meleeweapon) { public: virtual truth HitEffect(character*, character*, v2, int, int, truth); virtual truth AllowAlphaEverywhere() const { return true; } protected: virtual int GetClassAnimationFrames() const { return 32; } virtual col16 GetOutlineColor(int) const; virtual alpha GetOutlineAlpha(int) const; }; ITEM(masamune, meleeweapon) { public: virtual truth HitEffect(character*, character*, v2, int, int, truth); virtual truth AllowAlphaEverywhere() const { return true; } protected: virtual int GetClassAnimationFrames() const { return 32; } virtual col16 GetOutlineColor(int) const; virtual alpha GetOutlineAlpha(int) const; }; ITEM(zulfiqar, meleeweapon) { public: virtual truth HitEffect(character*, character*, v2, int, int, truth); }; ITEM(tipswordofpenetration, meleeweapon) { public: virtual truth HitEffect(character*, character*, v2, int, int, truth); }; ITEM(maingauche, meleeweapon) { }; ITEM(lynslag, meleeweapon) { }; ITEM(thievesgirdle, belt) { public: virtual truth HitEffect(character*, character*, v2, int, int, truth); protected: virtual truth CleptiaHelps(ccharacter*, ccharacter*) const; };
~~~~~~~IVAN Resource compilation documentation~~~~~~~ ~~"Because everyone loves the banana-pickaxe logo!"~~ 1. Compile Ivan.res with following MinGW command (from /Main/Resource) > windres Ivan.rc -O coff -o Ivan.res 2. add filepath to last line of ivanmgw.mak: > $(IVANBIN) : $(FeLibGCH) $(FeLibOBJ) $(IVANGCH) $(IVANOBJ) > @echo Compiling $(IVANBIN)... > @$(CC) $(IVANBIN) $(FeLibOBJ) $(IVANOBJ) $(FLAGS) $(LIBS) C:\ivan\Main\Resource\Ivan.res 3. Compile IVAN with mingw32-make as usual and IVAN.exe will have the beloved icon. **Note: This is a temporary fix; the above steps should be entirely incorporated into the makefile, though my initial attempts at this have failed.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Danger System of Iter Vehemens ad Necem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Organization is (ideally) from the ground up, such that the document can be read straight through without having to skip around for definitions. For simplicity's sake, when possible, in character:: member functions, the calling character shall be assumed to be the player (a note will be made upon each necessary suspension of this assumption). ~ GetTimeToDie char.cpp, line 5702: double character::GetTimeToDie(ccharacter* Enemy, int Damage, double ToHitValue, truth AttackIsBlockable, truth UseMaxHP) const bodypart.cpp, line 1507: double bodypart::GetTimeToDie(int Damage, double ToHitValue, double DodgeValue, truth AttackIsBlockable, truth UseMaxHP) const Various damage calculations are performed. Returns minimum hits required to kill character. ~ GetTimeToKill nonhuman.cpp, line 349: double nonhumanoid::GetTimeToKill(ccharacter* Enemy, truth UseMaxHP) const human.cpp, line 1924: double humanoid::GetTimeToKill(ccharacter* Enemy, truth UseMaxHP) const /* Returns the average number of APs required to kill Enemy */ TimeToKill = AttackStyles / Effectivity AttackStyles is incremented for each type of attack the enemy has: Arm-based attacks, Leg-based attacks, and Head-based attacks. For each AttackStyle an addition to Effectivity is calculated in part by GetTimeToDie(), which seems to be where equipment actually factors into danger calculations (as GetTimeToDie() performs various damage calculations). If character is hasted Effectivity is doubled. If character is slowed Effectivity is halved. Should AttackStyles be equal to 0, a value of 10,000,000 will be returned instead of AttackStyles/Effectivity. ~ Limit felibdef.h, line 68: inline type Limit(type Value, type Minimum, type Maximum) { return Value >= Minimum ? Value <= Maximum ? Value : Maximum : Minimum; } If I interpret this properly, then this is equivalent to: if (Value >= Minimum) { if (Value <= Maximum) return Value; else return Maximum; } else return Minimum; or, more simply: if (Value < Minimum) return Minimum; if (Value > Maximum) return Maximum; else return Value; In essence, if the result is below the minimum, it returns the minimum, and the same should the result be over the maximum. Should the value be within the limits it is returned intact. ~ Relative Danger char.cpp, live 5732: double character::GetRelativeDanger(ccharacter* Enemy, truth UseMaxHP) const /*calculates relative danger of Enemy*/ TimeToKill is used to calculate the initial Danger, via dividing the enemy's time to kill the player by the player's time to kill the enemy. If Enemy's movement AP requirement is greater than that of the player, Danger is multiplied by 1.25. In the opposite case, Danger is multiplied by 0.80. If the Enemy is not visible, Danger is halved (if Enemy is the player it is multiplied by 0.2). If the Player is not visible to the Enemy, Danger is multiplied by 5 (if the caller is a non-player, Danger is doubled). ##This doesn't make sense; shouldn't the opposite be the case? GetTimeToDie may be the key here, ##since being invisible to the other party should heavily affect the ToHitValue. If the caller is NOT the player, and has an INT of less than 10, Danger is multiplied by 0.80. If the Enemy has an intelligence of less than 10 (and is NOT the player), Danger is multiplied by 1.25. Returns Limit fuction of Danger with a minimum of 0.001, and maximum of 1000. ~ Danger Map Map containing danger values of characters ~ Naked Danger Component of Danger Map ~ Equipped Danger Component of Danger Map ~ Knowledge of the Ancients Option D (Character Danger Values) displays three stats for each character: Danger (Relative Danger (to player)*1000), NGM (Naked Danger*1000), and EGM (Equipped Danger*1000) ~ InitDangerMap ? ~ CalculateNextDanger ? ~ Danger Iterator ? ~ GetMinDifficulty ~ BalancedCreateMonster proto.cpp, line 22: character* protosystem::BalancedCreateMonster() This is the most interesting part: the part where the game actually determines what critters to spawn!