1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Support for level-dependent spell bonuses (Deemer)

TODO: Bonuses for Resurrection, Animate Dead and probably other non-direct damage spells.
This commit is contained in:
DjWarmonger
2010-07-17 13:49:58 +00:00
parent 115b626cfd
commit 91b0340540
3 changed files with 15 additions and 15 deletions

View File

@@ -10,7 +10,7 @@
8 2 5 27 0 8 2 5 27 0
9 6 41 0 3 9 6 41 0 3
10 8 45 0 0 10 8 45 0 0
11 3 20 0 3 11 3 3 20 0
12 1 0 0 8 12 1 0 0 8
13 2 5 11 0 13 2 5 11 0
14 8 48 0 0 14 8 48 0 0
@@ -24,12 +24,12 @@
22 1 0 0 24 22 1 0 0 24
23 2 5 2 0 23 2 5 2 0
24 8 55 1 0 24 8 55 1 0
25 3 37 0 3 25 3 3 37 0
26 2 5 24 0 26 2 5 24 0
27 2 5 27 0 27 2 5 27 0
28 2 5 11 0 28 2 5 11 0
29 7 51 0 0 29 7 51 0 0
30 3 16 0 3 30 3 3 16 0
31 1 0 0 20 31 1 0 0 20
32 1 0 0 30 32 1 0 0 30
33 1 0 0 36 33 1 0 0 36
@@ -39,12 +39,12 @@
37 1 0 0 38 37 1 0 0 38
38 10 1 1 0 38 10 1 1 0
39 1 0 0 36 39 1 0 0 36
40 3 60 0 3 40 3 3 60 0
41 2 5 8 1 41 2 5 8 1
42 2 5 11 0 42 2 5 11 0
43 7 51 0 0 43 7 51 0 0
44 1 0 0 34 44 1 0 0 34
45 3 19 0 3 45 3 3 19 0
46 8 53 0 0 46 8 53 0 0
47 10 350 6 0 47 10 350 6 0
48 1 0 0 46 48 1 0 0 46
@@ -56,13 +56,13 @@
54 1 0 0 146 54 1 0 0 146
55 1 0 0 50 55 1 0 0 50
56 2 5 24 0 56 2 5 24 0
57 3 22 0 3 57 3 3 22 0
58 2 5 8 1 58 2 5 8 1
59 8 45 0 0 59 8 45 0 0
60 10 1 3 0 60 10 1 3 0
61 8 43 0 0 61 8 43 0 0
62 2 5 25 0 62 2 5 25 0
63 3 21 0 3 63 3 3 21 0
64 1 0 0 58 64 1 0 0 58
65 1 0 0 62 65 1 0 0 62
66 1 0 0 64 66 1 0 0 64
@@ -71,8 +71,8 @@
69 2 5 12 0 69 2 5 12 0
70 10 350 6 0 70 10 350 6 0
71 1 0 0 56 71 1 0 0 56
72 3 24 0 3 72 3 3 24 0
73 3 23 0 3 73 3 3 23 0
74 2 5 25 0 74 2 5 25 0
75 2 5 11 1 75 2 5 11 1
76 3 39 0 3 76 3 39 0 3
@@ -87,12 +87,12 @@
85 2 5 2 0 85 2 5 2 0
86 1 0 0 80 86 1 0 0 80
87 1 0 0 70 87 1 0 0 70
88 3 38 0 3 88 3 3 38 0
89 2 5 8 1 89 2 5 8 1
90 2 5 25 0 90 2 5 25 0
91 3 38 0 3 91 3 3 38 0
92 2 5 11 1 92 2 5 11 1
93 3 23 0 3 93 3 3 23 0
94 10 1 4 0 94 10 1 4 0
95 8 46 0 0 95 8 46 0 0
96 1 0 0 94 96 1 0 0 94

View File

@@ -1026,11 +1026,9 @@ void CGHeroInstance::initObj()
bonus.val = valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, it->subtype) * it->val; //TODO: limit range to hero only bonus.val = valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, it->subtype) * it->val; //TODO: limit range to hero only
speciality.bonuses.push_back(bonus); speciality.bonuses.push_back(bonus);
break; break;
case 3://spell damage bonus, level dependant case 3://spell damage bonus, level dependant but calculated elsehwere
speciality.growthsWithLevel = true;
bonus.type = Bonus::SPECIAL_SPELL_LEV; bonus.type = Bonus::SPECIAL_SPELL_LEV;
bonus.subtype = it->subtype; bonus.subtype = it->subtype;
bonus.additionalInfo = it->additionalinfo;
speciality.bonuses.push_back (bonus); speciality.bonuses.push_back (bonus);
break; break;
case 4://creature stat boost case 4://creature stat boost

View File

@@ -3086,6 +3086,8 @@ ui32 BattleInfo::calculateSpellDmg( const CSpell * sp, const CGHeroInstance * ca
ret *= 100 + affectedCreature->valOfBonuses(Bonus::MORE_DAMAGE_FROM_SPELL, sp->id); ret *= 100 + affectedCreature->valOfBonuses(Bonus::MORE_DAMAGE_FROM_SPELL, sp->id);
ret /= 100; ret /= 100;
} }
if (caster) //Hero specials like Solmyr, Deemer
ret *= (100.f + ((caster->valOfBonuses(Bonus::SPECIAL_SPELL_LEV, sp->id) * caster->level) / affectedCreature->type->level)) / 100.0f;
} }
return ret; return ret;