3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
8 * See LICENSING which should be included
9 * along with this file for more details
18 ITEM(meleeweapon
, item
)
22 meleeweapon(const meleeweapon
&);
23 virtual ~meleeweapon();
24 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
25 virtual void DipInto(liquid
*, character
*);
26 virtual sLong
GetPrice() const;
27 virtual truth
IsDippable(ccharacter
*) const;
28 virtual material
* GetSecondaryMaterial() const { return SecondaryMaterial
; }
29 virtual void SetSecondaryMaterial(material
*, int = 0);
30 virtual void ChangeSecondaryMaterial(material
*, int = 0);
31 void InitMaterials(material
*, material
*, truth
= true);
32 virtual void Save(outputfile
&) const;
33 virtual void Load(inputfile
&);
34 virtual int GetMaterials() const { return 2; }
35 virtual void AddInventoryEntry(ccharacter
*, festring
&, int, truth
) const;
36 virtual void SignalSpoil(material
*);
38 virtual truth
IsWeapon(ccharacter
*) const { return true; }
39 virtual int GetEnchantment() const { return Enchantment
; }
40 virtual void SetEnchantment(int);
41 virtual void EditEnchantment(int);
42 virtual int GetStrengthValue() const;
43 virtual truth
IsFixableBySmith(ccharacter
*) const { return IsBroken() || IsRusted(); }
44 virtual truth
IsFixableByTailor(ccharacter
*) const { return IsBroken(); }
45 virtual double GetTHVBonus() const;
46 virtual double GetDamageBonus() const;
47 virtual int GetSpoilLevel() const;
48 virtual material
* GetMaterial(int) const;
49 virtual void TryToRust(sLong
);
50 virtual material
* GetConsumeMaterial(ccharacter
*, materialpredicate
= TrueMaterialPredicate
) const;
51 virtual pixelpredicate
GetFluidPixelAllowedPredicate() const;
52 virtual material
* RemoveMaterial(material
*);
53 material
* RemoveMainMaterial();
54 material
* RemoveSecondaryMaterial();
55 virtual v2
GetWieldedBitmapPos(int) const;
56 virtual void CalculateEmitation();
57 virtual void InitMaterials(const materialscript
*, const materialscript
*, truth
);
59 virtual void CalculateEnchantment();
60 virtual truth
AllowFluids() const { return true; }
61 virtual int GetSparkleFlags() const;
63 virtual sLong
GetMaterialPrice() const;
64 virtual truth
CalculateHasBe() const;
65 virtual void PostConstruct();
66 virtual void AddPostFix(festring
&, int) const;
67 virtual void GenerateMaterials();
68 virtual col16
GetMaterialColorB(int) const;
69 virtual col16
GetMaterialColorC(int) const;
70 virtual alpha
GetAlphaB(int) const;
71 virtual int GetRustDataB() const;
72 virtual col16
GetDripColor() const;
73 virtual truth
AllowRegularColors() const;
74 material
* SecondaryMaterial
;
78 ITEM(justifier
, meleeweapon
)
81 virtual truth
AllowAlphaEverywhere() const { return true; }
83 virtual int GetClassAnimationFrames() const { return 32; }
84 virtual col16
GetOutlineColor(int) const;
85 virtual alpha
GetOutlineAlpha(int) const;
88 ITEM(neercseulb
, meleeweapon
)
91 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
92 virtual truth
AllowAlphaEverywhere() const { return true; }
94 virtual int GetClassAnimationFrames() const { return 32; }
95 virtual col16
GetOutlineColor(int) const;
96 virtual alpha
GetOutlineAlpha(int) const;
99 ITEM(pickaxe
, meleeweapon
)
102 virtual truth
Apply(character
*);
103 virtual truth
IsAppliable(ccharacter
*) const;
106 ITEM(whip
, meleeweapon
)
109 virtual truth
IsWhip() const { return true; }
111 virtual int GetFormModifier() const;
114 ITEM(flamingsword
, meleeweapon
)
117 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
118 virtual int GetSpecialFlags() const;
121 ITEM(mjolak
, meleeweapon
)
124 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
127 ITEM(vacuumblade
, meleeweapon
)
130 virtual truth
HitEffect (character
*, character
*, v2
, int, int, truth
);
133 ITEM(vermis
, meleeweapon
)
136 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
139 ITEM(turox
, meleeweapon
)
142 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
145 ITEM(whipofthievery
, whip
)
148 virtual sLong
GetPrice() const;
149 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
151 virtual truth
CleptiaHelps(ccharacter
*, ccharacter
*) const;
154 ITEM(gorovitsweapon
, meleeweapon
)
157 virtual truth
IsGorovitsFamilyRelic() const { return true; }
158 virtual truth
AllowAlphaEverywhere() const { return true; }
160 virtual int GetClassAnimationFrames() const { return 32; }
161 virtual col16
GetOutlineColor(int) const;
162 virtual alpha
GetOutlineAlpha(int) const;
165 ITEM(thunderhammer
, meleeweapon
)
168 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
169 virtual int GetSpecialFlags() const;
170 virtual truth
ReceiveDamage(character
*, int, int, int);
173 ITEM(saalthul
, meleeweapon
)
180 virtual sLong
GetPrice() const;
181 virtual void AddInventoryEntry(ccharacter
*, festring
&, int, truth
) const;
182 virtual void Save(outputfile
&) const;
183 virtual void Load(inputfile
&);
184 virtual truth
IsArmor(ccharacter
*) const { return true; }
185 virtual int GetEnchantment() const { return Enchantment
; }
186 virtual void SetEnchantment(int);
187 virtual void EditEnchantment(int);
188 virtual int GetStrengthValue() const;
189 virtual truth
CanBePiledWith(citem
*, ccharacter
*) const;
190 virtual int GetInElasticityPenalty(int) const;
191 virtual int GetCarryingBonus() const;
192 virtual truth
IsFixableBySmith(ccharacter
*) const { return IsBroken() || IsRusted(); }
193 virtual truth
IsFixableByTailor(ccharacter
*) const { return IsBroken(); }
194 virtual truth
AllowFluids() const { return true; }
195 virtual void CalculateEnchantment();
196 virtual double GetTHVBonus() const;
197 virtual double GetDamageBonus() const;
199 virtual void AddPostFix(festring
&, int) const;
200 virtual void PostConstruct();
204 ITEM(bodyarmor
, armor
)
207 virtual sLong
GetPrice() const;
208 virtual truth
IsBodyArmor(ccharacter
*) const { return true; }
209 virtual truth
IsInCorrectSlot(int) const;
211 virtual cchar
* GetBreakVerb() const;
212 virtual truth
AddAdjective(festring
&, truth
) const;
213 virtual cfestring
& GetNameSingular() const;
216 ITEM(goldeneagleshirt
, bodyarmor
)
219 virtual truth
IsGoldenEagleShirt() const { return true; }
220 virtual truth
IsConsumable() const { return false; }
221 virtual truth
AllowAlphaEverywhere() const { return true; }
223 virtual int GetClassAnimationFrames() const { return 32; }
224 virtual col16
GetOutlineColor(int) const;
225 virtual alpha
GetOutlineAlpha(int) const;
231 virtual sLong
GetPrice() const;
232 virtual truth
IsShield(ccharacter
*) const { return true; }
233 virtual void AddInventoryEntry(ccharacter
*, festring
&, int, truth
) const;
239 virtual sLong
GetPrice() const;
240 virtual truth
IsCloak(ccharacter
*) const { return true; }
241 virtual truth
IsInCorrectSlot(int) const;
242 virtual truth
ReceiveDamage(character
*, int, int, int);
244 virtual int GetSpecialFlags() const;
245 virtual cchar
* GetBreakVerb() const;
246 virtual truth
AddAdjective(festring
&, truth
) const;
247 virtual col16
GetMaterialColorB(int) const;
253 virtual sLong
GetPrice() const;
254 virtual truth
IsBoot(ccharacter
*) const { return true; }
255 virtual truth
IsInCorrectSlot(int) const;
258 ITEM(gauntlet
, armor
)
261 virtual sLong
GetPrice() const;
262 virtual truth
IsGauntlet(ccharacter
*) const { return true; }
263 virtual truth
IsInCorrectSlot(int) const;
269 virtual sLong
GetPrice() const;
270 virtual truth
IsBelt(ccharacter
*) const { return true; }
271 virtual int GetFormModifier() const;
272 virtual truth
IsInCorrectSlot(int) const;
273 virtual col16
GetMaterialColorB(int Frame
) const { return GetMaterialColorA(Frame
); }
276 typedef lockable
<belt
, itemlock
> lockablebelt
;
281 virtual truth
IsRing(ccharacter
*) const { return true; }
282 virtual truth
IsInCorrectSlot(int) const;
283 virtual truth
IsLuxuryItem(ccharacter
*) const { return true; }
285 virtual col16
GetMaterialColorB(int) const;
288 ITEM(ringofthieves
, ring
)
291 virtual truth
IsRingOfThieves () const { return true; }
297 virtual truth
IsAmulet(ccharacter
*) const { return true; }
298 virtual truth
IsInCorrectSlot(int) const;
299 virtual truth
IsLuxuryItem(ccharacter
*) const { return true; }
301 virtual col16
GetMaterialColorB(int) const;
307 virtual truth
IsGorovitsFamilyRelic() const;
308 virtual sLong
GetPrice() const;
309 virtual truth
IsHelmet(ccharacter
*) const { return true; }
310 virtual truth
IsInCorrectSlot(int) const;
312 virtual col16
GetMaterialColorB(int) const;
313 virtual col16
GetMaterialColorC(int) const;
316 ITEM(chameleonwhip
, whip
)
319 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
321 virtual truth
ScabiesHelps(ccharacter
*, ccharacter
*) const;
324 ITEM(wondersmellstaff
, meleeweapon
)
327 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
328 virtual truth
AllowAlphaEverywhere() const { return true; }
329 virtual void Break(character
*, int);
331 virtual int GetClassAnimationFrames() const;
332 virtual col16
GetOutlineColor(int) const;
333 virtual alpha
GetOutlineAlpha(int) const;
336 ITEM(decosadshirt
, bodyarmor
)
341 virtual void Save(outputfile
&) const;
342 virtual void Load(inputfile
&);
343 feuLong
GetEquippedTicks() { return EquippedTicks
; }
344 void SetEquippedTicks(feuLong What
) { EquippedTicks
= What
; }
345 virtual truth
IsDecosAdShirt(ccharacter
*) const { return true; }
347 virtual truth
CalculateHasBe() const { return true; }
348 feuLong EquippedTicks
;
351 ITEM(weepblade
, meleeweapon
)
354 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
357 ITEM(daggerofvenom
, meleeweapon
)
360 daggerofvenom() { Enable(); }
363 virtual truth
CalculateHasBe() const { return true; }
367 ITEM(acidshield
, shield
)
370 virtual void BlockEffect(character
*, character
*, item
*, int Type
);
373 ITEM(chastitybelt
, lockablebelt
)
376 virtual int GetFormModifier() const { return item::GetFormModifier(); }
379 ITEM(sunsword
, meleeweapon
)
383 ITEM(rescuethepeasant
, meleeweapon
)
387 ITEM(vormav
, meleeweapon
)
391 ITEM(cronus
, meleeweapon
)
395 ITEM(defender
, meleeweapon
)
399 ITEM(aethier
, meleeweapon
)
407 ITEM(phoenixshield
, shield
)
411 ITEM(belderiver
, meleeweapon
)
414 virtual truth
AllowAlphaEverywhere () const { return true; }
416 virtual int GetClassAnimationFrames () const { return 32; }
417 virtual col16
GetOutlineColor (int) const;
418 virtual alpha
GetOutlineAlpha (int) const;
421 ITEM(loricatushammer
, meleeweapon
)
424 virtual truth
AllowAlphaEverywhere () const { return true; }
426 virtual int GetClassAnimationFrames() const { return 32; }
427 virtual col16
GetOutlineColor (int) const;
428 virtual alpha
GetOutlineAlpha (int) const;
431 ITEM(goldenjaguarshirt
, bodyarmor
)
434 virtual truth
IsConsumable () const { return false; }
435 virtual truth
AllowAlphaEverywhere () const { return true; }
437 virtual int GetClassAnimationFrames () const { return 32; }
438 virtual col16
GetOutlineColor (int) const;
439 virtual alpha
GetOutlineAlpha (int) const;
442 ITEM(demonhead
, meleeweapon
)
445 virtual truth
AllowAlphaEverywhere () const { return true; }
447 virtual int GetClassAnimationFrames () const { return 32; }
448 virtual col16
GetOutlineColor (int) const;
449 virtual alpha
GetOutlineAlpha (int) const;
452 ITEM(smite
, meleeweapon
)
455 virtual truth
HitEffect (character
*, character
*, v2
, int, int, truth
);
456 virtual int GetSpecialFlags () const;
457 virtual truth
ReceiveDamage (character
*, int, int, int);
460 ITEM(muramasa
, meleeweapon
)
463 virtual truth
HitEffect (character
*, character
*, v2
, int, int, truth
);
464 virtual truth
AllowAlphaEverywhere() const { return true; }
466 virtual int GetClassAnimationFrames () const { return 32; }
467 virtual col16
GetOutlineColor (int) const;
468 virtual alpha
GetOutlineAlpha (int) const;
471 ITEM(masamune
, meleeweapon
)
474 virtual truth
HitEffect (character
*, character
*, v2
, int, int, truth
);
475 virtual truth
AllowAlphaEverywhere () const { return true; }
477 virtual int GetClassAnimationFrames () const { return 32; }
478 virtual col16
GetOutlineColor(int) const;
479 virtual alpha
GetOutlineAlpha(int) const;
482 ITEM(zulfiqar
, meleeweapon
)
485 virtual truth
HitEffect (character
*, character
*, v2
, int, int, truth
);
488 ITEM(tipswordofpenetration
, meleeweapon
)
491 virtual truth
HitEffect (character
*, character
*, v2
, int, int, truth
);
494 ITEM(maingauche
, meleeweapon
)
498 ITEM(gleipnir
, whipofthievery
)
502 ITEM(kawai
, meleeweapon
)
505 virtual truth
HitEffect (character
*, character
*, v2
, int, int, truth
);
506 virtual truth
AllowAlphaEverywhere() const { return true; }
508 virtual int GetClassAnimationFrames () const { return 32; }
509 virtual col16
GetOutlineColor (int) const;
510 virtual alpha
GetOutlineAlpha (int) const;
514 ITEM(eptyron
, meleeweapon
)
517 virtual truth
HitEffect(character
*, character
*, v2
, int, int, truth
);
518 virtual void BlockEffect(character
*, character
*, item
*, int Type
);
519 virtual truth
AllowAlphaEverywhere() const { return true; }
520 //virtual void Break(character*, int); //should it have a break effect??
522 virtual int GetClassAnimationFrames() const;
523 virtual col16
GetOutlineColor(int) const;
524 virtual alpha
GetOutlineAlpha(int) const;
527 ITEM(taiaha
, meleeweapon
)
530 //virtual truth HitEffect(character*, character*, v2, int, int, truth);
531 //virtual void BlockEffect(character*, character*, item*, int Type);
532 virtual truth
AllowAlphaEverywhere() const { return true; }
533 virtual void Save(outputfile
&) const;
534 virtual void Load(inputfile
&);
535 virtual void ChargeFully(character
*) { TimesUsed
= 0; }
536 virtual truth
IsAppliable(ccharacter
*) const { return false; }
537 virtual truth
IsZappable(ccharacter
*) const { return true; }
538 virtual truth
IsChargeable(ccharacter
*) const { return true; }
539 virtual truth
ReceiveDamage(character
*, int, int, int);
540 virtual truth
Zap(character
*, v2
, int);
541 virtual void AddInventoryEntry(ccharacter
*, festring
&, int, truth
) const; //this?
542 virtual truth
IsExplosive() const { return true; }
544 virtual int GetClassAnimationFrames() const;
545 virtual col16
GetOutlineColor(int) const;
546 virtual alpha
GetOutlineAlpha(int) const;
547 virtual void PostConstruct();
548 void BreakEffect(character
*, cfestring
&);
549 //feuLong GetSpecialParameters() const;