Added IsFireproof hook for monsters.ini
This commit is contained in:
parent
a37b36adab
commit
e1476ebb26
@ -4,6 +4,7 @@ AttackRate=1
|
|||||||
AttackDamage=2.0
|
AttackDamage=2.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=16
|
MaxHealth=16
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Chicken]
|
[Chicken]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -11,6 +12,7 @@ AttackRate=1
|
|||||||
AttackDamage=1.0
|
AttackDamage=1.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=4
|
MaxHealth=4
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Cow]
|
[Cow]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -18,6 +20,7 @@ AttackRate=1
|
|||||||
AttackDamage=1.0
|
AttackDamage=1.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=10
|
MaxHealth=10
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Pig]
|
[Pig]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -25,6 +28,7 @@ AttackRate=1
|
|||||||
AttackDamage=1.0
|
AttackDamage=1.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=10
|
MaxHealth=10
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Sheep]
|
[Sheep]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -32,6 +36,7 @@ AttackRate=1
|
|||||||
AttackDamage=1.0
|
AttackDamage=1.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=8
|
MaxHealth=8
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Squid]
|
[Squid]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -39,6 +44,7 @@ AttackRate=1
|
|||||||
AttackDamage=1.0
|
AttackDamage=1.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=10
|
MaxHealth=10
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Enderman]
|
[Enderman]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -46,6 +52,7 @@ AttackRate=1
|
|||||||
AttackDamage=4.0
|
AttackDamage=4.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=40
|
MaxHealth=40
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[ZombiePigman]
|
[ZombiePigman]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -53,6 +60,7 @@ AttackRate=1
|
|||||||
AttackDamage=7.0
|
AttackDamage=7.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=20
|
MaxHealth=20
|
||||||
|
IsFireproof=1
|
||||||
|
|
||||||
[Cavespider]
|
[Cavespider]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -60,6 +68,7 @@ AttackRate=1
|
|||||||
AttackDamage=2.0
|
AttackDamage=2.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=12
|
MaxHealth=12
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Creeper]
|
[Creeper]
|
||||||
AttackRange=3.0
|
AttackRange=3.0
|
||||||
@ -67,6 +76,7 @@ AttackRate=1
|
|||||||
AttackDamage=0.0
|
AttackDamage=0.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=20
|
MaxHealth=20
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Ghast]
|
[Ghast]
|
||||||
AttackRange=50.0
|
AttackRange=50.0
|
||||||
@ -74,6 +84,7 @@ AttackRate=1
|
|||||||
AttackDamage=0.0
|
AttackDamage=0.0
|
||||||
SightDistance=50.0
|
SightDistance=50.0
|
||||||
MaxHealth=10
|
MaxHealth=10
|
||||||
|
IsFireproof=1
|
||||||
|
|
||||||
[Silverfish]
|
[Silverfish]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -81,12 +92,14 @@ AttackRate=1
|
|||||||
AttackDamage=1.0
|
AttackDamage=1.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=8
|
MaxHealth=8
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Skeleton]
|
[Skeleton]
|
||||||
AttackRange=15.0
|
AttackRange=15.0
|
||||||
AttackRate=1
|
AttackRate=1
|
||||||
SightDistance=40.0
|
SightDistance=40.0
|
||||||
MaxHealth=20
|
MaxHealth=20
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Slime]
|
[Slime]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -94,6 +107,7 @@ AttackRate=1
|
|||||||
AttackDamage=4.0
|
AttackDamage=4.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=16
|
MaxHealth=16
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Zombie]
|
[Zombie]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -101,6 +115,7 @@ AttackRate=1
|
|||||||
AttackDamage=4.0
|
AttackDamage=4.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=20
|
MaxHealth=20
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Wolf]
|
[Wolf]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -108,6 +123,7 @@ AttackRate=1
|
|||||||
AttackDamage=4.0
|
AttackDamage=4.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=20
|
MaxHealth=20
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Blaze]
|
[Blaze]
|
||||||
AttackRange=15.0
|
AttackRange=15.0
|
||||||
@ -115,6 +131,7 @@ AttackRate=1
|
|||||||
AttackDamage=6.0
|
AttackDamage=6.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=20
|
MaxHealth=20
|
||||||
|
IsFireproof=1
|
||||||
|
|
||||||
[Villager]
|
[Villager]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -122,6 +139,7 @@ AttackRate=1
|
|||||||
AttackDamage=0.0
|
AttackDamage=0.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=20
|
MaxHealth=20
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Witch]
|
[Witch]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -129,6 +147,7 @@ AttackRate=1
|
|||||||
AttackDamage=0.0
|
AttackDamage=0.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=26
|
MaxHealth=26
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
|
|
||||||
[Ocelot]
|
[Ocelot]
|
||||||
@ -137,6 +156,7 @@ AttackRate=1
|
|||||||
AttackDamage=0.0
|
AttackDamage=0.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=10
|
MaxHealth=10
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Mooshroom]
|
[Mooshroom]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -144,6 +164,7 @@ AttackRate=1
|
|||||||
AttackDamage=0.0
|
AttackDamage=0.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=10
|
MaxHealth=10
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[MagmaCube]
|
[MagmaCube]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -151,6 +172,7 @@ AttackRate=1
|
|||||||
AttackDamage=6.0
|
AttackDamage=6.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=16
|
MaxHealth=16
|
||||||
|
IsFireproof=1
|
||||||
|
|
||||||
[Horse]
|
[Horse]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -158,6 +180,7 @@ AttackRate=1
|
|||||||
AttackDamage=6.0
|
AttackDamage=6.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=30
|
MaxHealth=30
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[EnderDragon]
|
[EnderDragon]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -165,6 +188,7 @@ AttackRate=1
|
|||||||
AttackDamage=6.0
|
AttackDamage=6.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=200
|
MaxHealth=200
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[Giant]
|
[Giant]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -172,6 +196,7 @@ AttackRate=1
|
|||||||
AttackDamage=6.0
|
AttackDamage=6.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=100
|
MaxHealth=100
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
[IronGolem]
|
[IronGolem]
|
||||||
AttackRange=2.0
|
AttackRange=2.0
|
||||||
@ -179,5 +204,6 @@ AttackRate=1
|
|||||||
AttackDamage=6.0
|
AttackDamage=6.0
|
||||||
SightDistance=25.0
|
SightDistance=25.0
|
||||||
MaxHealth=100
|
MaxHealth=100
|
||||||
|
IsFireproof=0
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ struct cMonsterConfig::sAttributesStruct
|
|||||||
int m_AttackRange;
|
int m_AttackRange;
|
||||||
double m_AttackRate;
|
double m_AttackRate;
|
||||||
int m_MaxHealth;
|
int m_MaxHealth;
|
||||||
|
bool m_IsFireproof;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -72,6 +73,7 @@ void cMonsterConfig::Initialize()
|
|||||||
Attributes.m_SightDistance = MonstersIniFile.GetValueI(Name, "SightDistance", 0);
|
Attributes.m_SightDistance = MonstersIniFile.GetValueI(Name, "SightDistance", 0);
|
||||||
Attributes.m_AttackRate = MonstersIniFile.GetValueF(Name, "AttackRate", 0);
|
Attributes.m_AttackRate = MonstersIniFile.GetValueF(Name, "AttackRate", 0);
|
||||||
Attributes.m_MaxHealth = MonstersIniFile.GetValueI(Name, "MaxHealth", 1);
|
Attributes.m_MaxHealth = MonstersIniFile.GetValueI(Name, "MaxHealth", 1);
|
||||||
|
Attributes.m_IsFireproof = MonstersIniFile.GetValueB(Name, "IsFireproof", false);
|
||||||
m_pState->AttributesList.push_front(Attributes);
|
m_pState->AttributesList.push_front(Attributes);
|
||||||
} // for i - SplitList[]
|
} // for i - SplitList[]
|
||||||
}
|
}
|
||||||
@ -92,6 +94,7 @@ void cMonsterConfig::AssignAttributes(cMonster * a_Monster, const AString & a_Na
|
|||||||
a_Monster->SetSightDistance(itr->m_SightDistance);
|
a_Monster->SetSightDistance(itr->m_SightDistance);
|
||||||
a_Monster->SetAttackRate ((float)itr->m_AttackRate);
|
a_Monster->SetAttackRate ((float)itr->m_AttackRate);
|
||||||
a_Monster->SetMaxHealth (itr->m_MaxHealth);
|
a_Monster->SetMaxHealth (itr->m_MaxHealth);
|
||||||
|
a_Monster->SetFireproofStatus(itr->m_IsFireproof);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} // for itr - m_pState->AttributesList[]
|
} // for itr - m_pState->AttributesList[]
|
||||||
|
Loading…
Reference in New Issue
Block a user