diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp
index a7e88175..a06eecf7 100644
--- a/Crawler/Crawler.cpp
+++ b/Crawler/Crawler.cpp
@@ -448,11 +448,9 @@ void Crawler::UpdateBullets(float fElapsedTime){
if(geom2d::overlaps(geom2d::circle(m.GetPos(),12*m.GetSizeMult()),geom2d::circle(b->pos,b->radius))){
if(b->hitList.find(&m)==b->hitList.end()&&m.Hurt(b->damage,b->OnUpperLevel())){
if(!b->hitsMultiple){
- if(b->MonsterHit(m)){
- it=BULLET_LIST.erase(it);
- if(it==BULLET_LIST.end()){
- goto outsideBulletLoop;
- }
+ it=BULLET_LIST.erase(it);
+ if(it==BULLET_LIST.end()){
+ goto outsideBulletLoop;
}
goto continueBulletLoop;
}
@@ -463,11 +461,9 @@ void Crawler::UpdateBullets(float fElapsedTime){
} else {
if(geom2d::overlaps(geom2d::circle(player->GetPos(),12*player->GetSizeMult()/2),geom2d::circle(b->pos,b->radius))){
if(player->Hurt(b->damage,b->OnUpperLevel())){
- if(b->PlayerHit(GetPlayer())){
- it=BULLET_LIST.erase(it);
- if(it==BULLET_LIST.end()){
- goto outsideBulletLoop;
- }
+ it=BULLET_LIST.erase(it);
+ if(it==BULLET_LIST.end()){
+ goto outsideBulletLoop;
}
goto continueBulletLoop;
}
diff --git a/Crawler/Crawler.vcxproj.filters b/Crawler/Crawler.vcxproj.filters
index 7546d61c..901c4caf 100644
--- a/Crawler/Crawler.vcxproj.filters
+++ b/Crawler/Crawler.vcxproj.filters
@@ -244,7 +244,6 @@
Documentation
-
Configurations
@@ -281,6 +280,9 @@
Configurations
+
+ Documentation
+
diff --git a/Crawler/Crawler_Slime_King_Encounter.txt b/Crawler/Crawler_Slime_King_Encounter.txt
new file mode 100644
index 00000000..9fcf4c10
--- /dev/null
+++ b/Crawler/Crawler_Slime_King_Encounter.txt
@@ -0,0 +1,47 @@
+Test Attributes, to be able to try encounter with the concept Warrior:
+HP: 1200
+Projectile Attack dmg: 10
+Jump Attack dmg: 20
+
+- Jumps need a telegraph on the ground.
+
+Slime King
+Base Size 800%
+
+100%
+Every 4 Seconds Shoots a ring of projectiles and another 2 rings with each 0.2 seconds delayed and slightly shifted.
+after 4 repeats of this pattern, jump in the air and target location player currently at. Lands after 3 seconds.
+After landing creats 1 ring of projectiles and takes 2 extra seconds to recover.
+
+repeats behaviour until 75% is reached.
+
+75%:
+Size changes to 600%
+Spawns 2 Slime adds (Monster C from Concept for now)
+
+shoots every second with 3 projectiles (shoots out the projectiles in same moment with 45 degree shiftet flight location) in players direction.
+after 5 shoots it charges for 5 seconds after that the king does 3 rapid jumps aiming for the player.
+first should be dodgeable. quite easily.
+second needs to be blocked with movement skill or iframe (unless high movespeed, 110% shall not be enough to dodge this, 110% can be achived without any special gear as bard permanently)
+third jump is a little slower that should allow a player with 100% movespeed to barely run out of it.
+
+50%:
+Size changes to 400%
+Spawns 2 Slime adds (Monster C from Concept for now)
+
+1 fast Jump towards player. 3 projectiles attacks with 0.5 seconds between attack.
+2 seconds recover.
+repeat.
+
+
+25%:
+Size changes to 200%
+Spawns 2 Slime adds (Monster B from Concept for now)
+Movespeed 50%
+
+King Shoots 5 projectiles, 0.1 sec delay Boss doesnt aim for the player directly instead shoots randomly in the general direction. runs away for 2.5 seconds. stands still for 1 second and shoot again.
+Repeat 5 times then instead of running jump up to 1000 Range away from player and repeat.
+
+0%:
+instead of dying Slime king Looses 50% size on every hit taken (1 sec iframe after taking dmg) until reaching 0% size and dies.
+Slime King only runs away with 50% move speed.
\ No newline at end of file
diff --git a/Crawler/Monster.cpp b/Crawler/Monster.cpp
index 56e907c9..20e6418f 100644
--- a/Crawler/Monster.cpp
+++ b/Crawler/Monster.cpp
@@ -117,23 +117,25 @@ bool Monster::Update(float fElapsedTime){
if(it==buffList.end())break;
}
}
- for(Monster&m:MONSTER_LIST){
- if(&m==this)continue;
- if(OnUpperLevel()==m.OnUpperLevel()&&geom2d::overlaps(geom2d::circle(pos,12*size/2),geom2d::circle(m.GetPos(),12*m.GetSizeMult()/2))){
- m.Collision(*this);
- geom2d::line line(pos,m.GetPos());
- float dist = line.length();
- m.SetPosition(line.rpoint(dist*1.1));
- if(m.IsAlive()){
- vel=line.vector().norm()*-128;
+ if(!HasIframes()){
+ for(Monster&m:MONSTER_LIST){
+ if(&m==this)continue;
+ if(!m.HasIframes()&&OnUpperLevel()==m.OnUpperLevel()&&geom2d::overlaps(geom2d::circle(pos,12*size/2),geom2d::circle(m.GetPos(),12*m.GetSizeMult()/2))){
+ m.Collision(*this);
+ geom2d::line line(pos,m.GetPos());
+ float dist = line.length();
+ m.SetPosition(line.rpoint(dist*1.1));
+ if(m.IsAlive()){
+ vel=line.vector().norm()*-128;
+ }
}
}
- }
- if(!game->GetPlayer()->HasIframes()&&game->GetPlayer()->OnUpperLevel()==OnUpperLevel()&&geom2d::overlaps(geom2d::circle(pos,12*size/2),geom2d::circle(game->GetPlayer()->GetPos(),12*game->GetPlayer()->GetSizeMult()/2))){
- geom2d::line line(pos,game->GetPlayer()->GetPos());
- float dist = line.length();
- SetPosition(line.rpoint(-0.1));
- vel=line.vector().norm()*-128;
+ if(!game->GetPlayer()->HasIframes()&&game->GetPlayer()->OnUpperLevel()==OnUpperLevel()&&geom2d::overlaps(geom2d::circle(pos,12*size/2),geom2d::circle(game->GetPlayer()->GetPos(),12*game->GetPlayer()->GetSizeMult()/2))){
+ geom2d::line line(pos,game->GetPlayer()->GetPos());
+ float dist = line.length();
+ SetPosition(line.rpoint(-0.1));
+ vel=line.vector().norm()*-128;
+ }
}
if(GetState()==State::NORMAL){
if(game->GetPlayer()->GetX()>pos.x){
@@ -221,7 +223,7 @@ std::string Monster::GetDeathAnimationName(){
return MONSTER_DATA[id].GetDeathAnimation();
}
bool Monster::Hurt(int damage,bool onUpperLevel){
- if(hp<=0||onUpperLevel!=OnUpperLevel()) return false;
+ if(hp<=0||onUpperLevel!=OnUpperLevel()||HasIframes()) return false;
float mod_dmg=damage;
for(Buff&b:GetBuffs(BuffType::DAMAGE_REDUCTION)){
mod_dmg-=damage*b.intensity;
@@ -339,4 +341,8 @@ void Monster::InitializeStrategies(){
readCounter++;
}
STRATEGY_DATA.SetInitialized();
+}
+
+bool Monster::HasIframes(){
+ return iframe_timer>0;
}
\ No newline at end of file
diff --git a/Crawler/Monster.h b/Crawler/Monster.h
index a5899388..9ad37c39 100644
--- a/Crawler/Monster.h
+++ b/Crawler/Monster.h
@@ -52,7 +52,7 @@ struct MonsterData{
struct Monster{
friend struct STRATEGY;
- private:
+private:
int id=0;
vf2d pos;
vf2d vel={0,0};
@@ -65,6 +65,8 @@ struct Monster{
float size;
float attackCooldownTimer=0;
float queueShotTimer=0;
+ float z=0;
+ float iframe_timer=0;
Key facingDirection;
int strategy;
State state=State::NORMAL;
@@ -123,6 +125,7 @@ public:
State GetState();
void SetState(State newState);
static void InitializeStrategies();
+ bool HasIframes();
private:
struct STRATEGY{
static int _GetInt(Monster&m,std::string param,int strategyNumber,int index=0);
diff --git a/Crawler/Player.cpp b/Crawler/Player.cpp
index 40fb62e3..47668964 100644
--- a/Crawler/Player.cpp
+++ b/Crawler/Player.cpp
@@ -304,7 +304,7 @@ void Player::Update(float fElapsedTime){
ability4.cooldown=0;
}
for(Monster&m:MONSTER_LIST){
- if(iframe_time==0&&OnUpperLevel()==m.OnUpperLevel()&&geom2d::overlaps(geom2d::circle(pos,12*size/2),geom2d::circle(m.GetPos(),12*m.GetSizeMult()/2))){
+ if(!HasIframes()&&OnUpperLevel()==m.OnUpperLevel()&&geom2d::overlaps(geom2d::circle(pos,12*size/2),geom2d::circle(m.GetPos(),12*m.GetSizeMult()/2))){
if(m.IsAlive()){
m.Collision(this);
}
@@ -485,7 +485,7 @@ bool Player::HasIframes(){
}
bool Player::Hurt(int damage,bool onUpperLevel){
- if(hp<=0||iframe_time!=0||OnUpperLevel()!=onUpperLevel) return false;
+ if(hp<=0||HasIframes()||OnUpperLevel()!=onUpperLevel) return false;
if(GetState()==State::BLOCK)damage*=1-"Warrior.Right Click Ability.DamageReduction"_F;
float mod_dmg=damage;
for(Buff&b:GetBuffs(BuffType::DAMAGE_REDUCTION)){
diff --git a/Crawler/Slime_King_Encounter.txt b/Crawler/Slime_King_Encounter.txt
index 9fcf4c10..9404bc20 100644
--- a/Crawler/Slime_King_Encounter.txt
+++ b/Crawler/Slime_King_Encounter.txt
@@ -25,6 +25,8 @@ first should be dodgeable. quite easily.
second needs to be blocked with movement skill or iframe (unless high movespeed, 110% shall not be enough to dodge this, 110% can be achived without any special gear as bard permanently)
third jump is a little slower that should allow a player with 100% movespeed to barely run out of it.
+(Long delay -> Jump (Immediate Second Jump) -> (Slight Delay) Third Jump)
+
50%:
Size changes to 400%
Spawns 2 Slime adds (Monster C from Concept for now)
diff --git a/Crawler/Version.h b/Crawler/Version.h
index 34b88913..15a447f4 100644
--- a/Crawler/Version.h
+++ b/Crawler/Version.h
@@ -2,7 +2,7 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 0
-#define VERSION_BUILD 1009
+#define VERSION_BUILD 1011
#define stringify(a) stringify_(a)
#define stringify_(a) #a
diff --git a/Crawler/assets/monsters/Slime King.png b/Crawler/assets/monsters/Slime King.png
new file mode 100644
index 00000000..81c73592
Binary files /dev/null and b/Crawler/assets/monsters/Slime King.png differ