summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/monsters.ini26
-rw-r--r--src/MonsterConfig.cpp3
2 files changed, 29 insertions, 0 deletions
diff --git a/MCServer/monsters.ini b/MCServer/monsters.ini
index cd5d92b66..8da3d6d24 100644
--- a/MCServer/monsters.ini
+++ b/MCServer/monsters.ini
@@ -4,6 +4,7 @@ AttackRate=1
AttackDamage=2.0
SightDistance=25.0
MaxHealth=16
+IsFireproof=0
[Chicken]
AttackRange=2.0
@@ -11,6 +12,7 @@ AttackRate=1
AttackDamage=1.0
SightDistance=25.0
MaxHealth=4
+IsFireproof=0
[Cow]
AttackRange=2.0
@@ -18,6 +20,7 @@ AttackRate=1
AttackDamage=1.0
SightDistance=25.0
MaxHealth=10
+IsFireproof=0
[Pig]
AttackRange=2.0
@@ -25,6 +28,7 @@ AttackRate=1
AttackDamage=1.0
SightDistance=25.0
MaxHealth=10
+IsFireproof=0
[Sheep]
AttackRange=2.0
@@ -32,6 +36,7 @@ AttackRate=1
AttackDamage=1.0
SightDistance=25.0
MaxHealth=8
+IsFireproof=0
[Squid]
AttackRange=2.0
@@ -39,6 +44,7 @@ AttackRate=1
AttackDamage=1.0
SightDistance=25.0
MaxHealth=10
+IsFireproof=0
[Enderman]
AttackRange=2.0
@@ -46,6 +52,7 @@ AttackRate=1
AttackDamage=4.0
SightDistance=25.0
MaxHealth=40
+IsFireproof=0
[ZombiePigman]
AttackRange=2.0
@@ -53,6 +60,7 @@ AttackRate=1
AttackDamage=7.0
SightDistance=25.0
MaxHealth=20
+IsFireproof=1
[Cavespider]
AttackRange=2.0
@@ -60,6 +68,7 @@ AttackRate=1
AttackDamage=2.0
SightDistance=25.0
MaxHealth=12
+IsFireproof=0
[Creeper]
AttackRange=3.0
@@ -67,6 +76,7 @@ AttackRate=1
AttackDamage=0.0
SightDistance=25.0
MaxHealth=20
+IsFireproof=0
[Ghast]
AttackRange=50.0
@@ -74,6 +84,7 @@ AttackRate=1
AttackDamage=0.0
SightDistance=50.0
MaxHealth=10
+IsFireproof=1
[Silverfish]
AttackRange=2.0
@@ -81,12 +92,14 @@ AttackRate=1
AttackDamage=1.0
SightDistance=25.0
MaxHealth=8
+IsFireproof=0
[Skeleton]
AttackRange=15.0
AttackRate=1
SightDistance=40.0
MaxHealth=20
+IsFireproof=0
[Slime]
AttackRange=2.0
@@ -94,6 +107,7 @@ AttackRate=1
AttackDamage=4.0
SightDistance=25.0
MaxHealth=16
+IsFireproof=0
[Zombie]
AttackRange=2.0
@@ -101,6 +115,7 @@ AttackRate=1
AttackDamage=4.0
SightDistance=25.0
MaxHealth=20
+IsFireproof=0
[Wolf]
AttackRange=2.0
@@ -108,6 +123,7 @@ AttackRate=1
AttackDamage=4.0
SightDistance=25.0
MaxHealth=20
+IsFireproof=0
[Blaze]
AttackRange=15.0
@@ -115,6 +131,7 @@ AttackRate=1
AttackDamage=6.0
SightDistance=25.0
MaxHealth=20
+IsFireproof=1
[Villager]
AttackRange=2.0
@@ -122,6 +139,7 @@ AttackRate=1
AttackDamage=0.0
SightDistance=25.0
MaxHealth=20
+IsFireproof=0
[Witch]
AttackRange=2.0
@@ -129,6 +147,7 @@ AttackRate=1
AttackDamage=0.0
SightDistance=25.0
MaxHealth=26
+IsFireproof=0
[Ocelot]
@@ -137,6 +156,7 @@ AttackRate=1
AttackDamage=0.0
SightDistance=25.0
MaxHealth=10
+IsFireproof=0
[Mooshroom]
AttackRange=2.0
@@ -144,6 +164,7 @@ AttackRate=1
AttackDamage=0.0
SightDistance=25.0
MaxHealth=10
+IsFireproof=0
[MagmaCube]
AttackRange=2.0
@@ -151,6 +172,7 @@ AttackRate=1
AttackDamage=6.0
SightDistance=25.0
MaxHealth=16
+IsFireproof=1
[Horse]
AttackRange=2.0
@@ -158,6 +180,7 @@ AttackRate=1
AttackDamage=6.0
SightDistance=25.0
MaxHealth=30
+IsFireproof=0
[EnderDragon]
AttackRange=2.0
@@ -165,6 +188,7 @@ AttackRate=1
AttackDamage=6.0
SightDistance=25.0
MaxHealth=200
+IsFireproof=0
[Giant]
AttackRange=2.0
@@ -172,6 +196,7 @@ AttackRate=1
AttackDamage=6.0
SightDistance=25.0
MaxHealth=100
+IsFireproof=0
[IronGolem]
AttackRange=2.0
@@ -179,5 +204,6 @@ AttackRate=1
AttackDamage=6.0
SightDistance=25.0
MaxHealth=100
+IsFireproof=0
diff --git a/src/MonsterConfig.cpp b/src/MonsterConfig.cpp
index c06bd6b6f..4b0e4bce1 100644
--- a/src/MonsterConfig.cpp
+++ b/src/MonsterConfig.cpp
@@ -17,6 +17,7 @@ struct cMonsterConfig::sAttributesStruct
int m_AttackRange;
double m_AttackRate;
int m_MaxHealth;
+ bool m_IsFireproof;
};
@@ -72,6 +73,7 @@ void cMonsterConfig::Initialize()
Attributes.m_SightDistance = MonstersIniFile.GetValueI(Name, "SightDistance", 0);
Attributes.m_AttackRate = MonstersIniFile.GetValueF(Name, "AttackRate", 0);
Attributes.m_MaxHealth = MonstersIniFile.GetValueI(Name, "MaxHealth", 1);
+ Attributes.m_IsFireproof = MonstersIniFile.GetValueB(Name, "IsFireproof", false);
m_pState->AttributesList.push_front(Attributes);
} // 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->SetAttackRate ((float)itr->m_AttackRate);
a_Monster->SetMaxHealth (itr->m_MaxHealth);
+ a_Monster->SetFireproofStatus(itr->m_IsFireproof);
return;
}
} // for itr - m_pState->AttributesList[]