Item Attribute systems reworked from being an enum class to being a class. Added support for the Buff Item Script to modify items. Implemented Damage Reduction proposal.
This commit is contained in:
@@ -240,7 +240,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
m.phase=ConfigInt("StartPhase");
|
||||
}break;
|
||||
case 1:{
|
||||
if(m.hp<=m.maxhp*ConfigFloat("Phase2.Change")/100){
|
||||
if(m.stats.A("Health")<=m.maxhp*ConfigFloat("Phase2.Change")/100){
|
||||
m.phase=2;
|
||||
m.SetSize(ConfigFloat("Phase2.Size")/100,false);
|
||||
TransitionPhase(m.phase);
|
||||
@@ -273,7 +273,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
}
|
||||
}break;
|
||||
case 2:{
|
||||
if(m.hp<=m.maxhp*ConfigFloat("Phase3.Change")/100){
|
||||
if(m.stats.A("Health")<=m.maxhp*ConfigFloat("Phase3.Change")/100){
|
||||
m.phase=3;
|
||||
m.SetSize(ConfigFloat("Phase3.Size")/100,false);
|
||||
TransitionPhase(m.phase);
|
||||
@@ -297,7 +297,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
}
|
||||
}break;
|
||||
case 3:{
|
||||
if(m.hp<=m.maxhp*ConfigFloat("Phase4.Change")/100){
|
||||
if(m.stats.A("Health")<=m.maxhp*ConfigFloat("Phase4.Change")/100){
|
||||
m.phase=4;
|
||||
m.SetSize(ConfigFloat("Phase4.Size")/100,false);
|
||||
m.AddBuff(BuffType::SLOWDOWN,99999,ConfigFloat("Phase4.MoveSpdModifier")/100);
|
||||
@@ -325,7 +325,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
}
|
||||
}break;
|
||||
case 4:{
|
||||
if(m.hp<=1){ //HP can't reach 0 when the dies normally flag is on.
|
||||
if(m.stats.A("Health")<=1){ //HP can't reach 0 when the dies normally flag is on.
|
||||
m.phase=5;
|
||||
m.F(A::IFRAME_TIME_UPON_HIT)=1;
|
||||
m.I(A::HITS_UNTIL_DEATH)=int(m.GetSizeMult()*100/ConfigFloat("Phase5.SizeLossPerHit"))-1;
|
||||
|
||||
Reference in New Issue
Block a user