@@ -19,6 +19,7 @@ type Creature struct {
1919 ImmuneTo []string `json:"immune"`
2020 StrongAgainst []string `json:"strong"`
2121 WeaknessAgainst []string `json:"weakness"`
22+ HealedBy []string `json:"healed"`
2223 BeParalysed bool `json:"be_paralysed"`
2324 BeSummoned bool `json:"be_summoned"`
2425 SummonMana int `json:"summoned_mana"`
4344 CreatureImmuneRegex = regexp .MustCompile (`.*are immune to (.*)` )
4445 CreatureStrongRegex = regexp .MustCompile (`.*are strong against (.*)` )
4546 CreatureWeakRegex = regexp .MustCompile (`.*are weak against (.*)` )
47+ CreatureHealedRegex = regexp .MustCompile (`.*are healed when (.*) damage is used.*` )
4648 CreatureManaRequiredRegex = regexp .MustCompile (`.*It takes (.*) mana to (.*)` )
4749 CreatureLootRegex = regexp .MustCompile (`.*yield (.*) experience.*carry (.*)with them.` )
4850)
@@ -69,7 +71,7 @@ func TibiaCreaturesCreatureV3Impl(race string, BoxContentHTML string) CreatureRe
6971 // Preparing vars
7072 var (
7173 CreatureName , CreatureImageURL , CreatureDescription , CreatureBehaviour string
72- CreatureLootList , CreatureImmuneTo , CreatureStrongAgainst , CreatureWeaknessAgainst []string
74+ CreatureLootList , CreatureImmuneTo , CreatureStrongAgainst , CreatureWeaknessAgainst , CreatureHealedBy []string
7375 CreatureHitpoints , CreatureSummonedMana , CreatureConvincedMana , CreatureExperiencePoints int
7476 CreatureBeParalysed , CreatureBeSummoned , CreatureBeConvinced , CreatureSeeInvisible , CreatureIsLootable , CreatureIsBoosted bool
7577 )
@@ -119,6 +121,11 @@ func TibiaCreaturesCreatureV3Impl(race string, BoxContentHTML string) CreatureRe
119121 CreatureWeaknessAgainstTmp := strings .Split (subma23 [0 ][1 ], localDamageString )
120122 CreatureWeaknessAgainst = strings .Split (strings .Replace (CreatureWeaknessAgainstTmp [0 ], " and " , ", " , 1 ), ", " )
121123 }
124+ if strings .Contains (subma1 [0 ][4 ], " are healed when " ) {
125+ subma23 := CreatureHealedRegex .FindAllStringSubmatch (subma1 [0 ][4 ], - 1 )
126+ CreatureHealedByTmp := strings .Split (subma23 [0 ][1 ], localDamageString )
127+ CreatureHealedBy = strings .Split (strings .Replace (CreatureHealedByTmp [0 ], " and " , ", " , 1 ), ", " )
128+ }
122129 if strings .Contains (subma1 [0 ][4 ], "It takes " ) && strings .Contains (subma1 [0 ][4 ], " mana to " ) {
123130 subma24 := CreatureManaRequiredRegex .FindAllStringSubmatch (subma1 [0 ][4 ], - 1 )
124131 subma2402 := subma24 [0 ][2 ]
@@ -164,6 +171,7 @@ func TibiaCreaturesCreatureV3Impl(race string, BoxContentHTML string) CreatureRe
164171 ImmuneTo : CreatureImmuneTo ,
165172 StrongAgainst : CreatureStrongAgainst ,
166173 WeaknessAgainst : CreatureWeaknessAgainst ,
174+ HealedBy : CreatureHealedBy ,
167175 BeParalysed : CreatureBeParalysed ,
168176 BeSummoned : CreatureBeSummoned ,
169177 SummonMana : CreatureSummonedMana ,
0 commit comments