Firebolt bullet speed increased, added slight screen shake on impact and added cooldown timer numbers next to cooldown bars.
This commit is contained in:
parent
460253d755
commit
559addb41f
84
.vscode/settings.json
vendored
Normal file
84
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"ostream": "cpp",
|
||||||
|
"iostream": "cpp",
|
||||||
|
"array": "cpp",
|
||||||
|
"atomic": "cpp",
|
||||||
|
"strstream": "cpp",
|
||||||
|
"bit": "cpp",
|
||||||
|
"*.tcc": "cpp",
|
||||||
|
"cctype": "cpp",
|
||||||
|
"charconv": "cpp",
|
||||||
|
"chrono": "cpp",
|
||||||
|
"clocale": "cpp",
|
||||||
|
"cmath": "cpp",
|
||||||
|
"codecvt": "cpp",
|
||||||
|
"compare": "cpp",
|
||||||
|
"concepts": "cpp",
|
||||||
|
"condition_variable": "cpp",
|
||||||
|
"cstdarg": "cpp",
|
||||||
|
"cstddef": "cpp",
|
||||||
|
"cstdint": "cpp",
|
||||||
|
"cstdio": "cpp",
|
||||||
|
"cstdlib": "cpp",
|
||||||
|
"cstring": "cpp",
|
||||||
|
"ctime": "cpp",
|
||||||
|
"cwchar": "cpp",
|
||||||
|
"cwctype": "cpp",
|
||||||
|
"deque": "cpp",
|
||||||
|
"list": "cpp",
|
||||||
|
"map": "cpp",
|
||||||
|
"string": "cpp",
|
||||||
|
"unordered_map": "cpp",
|
||||||
|
"unordered_set": "cpp",
|
||||||
|
"vector": "cpp",
|
||||||
|
"exception": "cpp",
|
||||||
|
"algorithm": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"iterator": "cpp",
|
||||||
|
"memory": "cpp",
|
||||||
|
"memory_resource": "cpp",
|
||||||
|
"numeric": "cpp",
|
||||||
|
"optional": "cpp",
|
||||||
|
"random": "cpp",
|
||||||
|
"ratio": "cpp",
|
||||||
|
"string_view": "cpp",
|
||||||
|
"system_error": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"type_traits": "cpp",
|
||||||
|
"utility": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"initializer_list": "cpp",
|
||||||
|
"iomanip": "cpp",
|
||||||
|
"iosfwd": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"mutex": "cpp",
|
||||||
|
"new": "cpp",
|
||||||
|
"numbers": "cpp",
|
||||||
|
"semaphore": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"stdexcept": "cpp",
|
||||||
|
"stop_token": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"thread": "cpp",
|
||||||
|
"cinttypes": "cpp",
|
||||||
|
"typeinfo": "cpp",
|
||||||
|
"variant": "cpp",
|
||||||
|
"__bit_reference": "cpp",
|
||||||
|
"__config": "cpp",
|
||||||
|
"__debug": "cpp",
|
||||||
|
"__errc": "cpp",
|
||||||
|
"__hash_table": "cpp",
|
||||||
|
"__locale": "cpp",
|
||||||
|
"__mutex_base": "cpp",
|
||||||
|
"__node_handle": "cpp",
|
||||||
|
"__split_buffer": "cpp",
|
||||||
|
"__threading_support": "cpp",
|
||||||
|
"__verbose_abort": "cpp",
|
||||||
|
"ios": "cpp",
|
||||||
|
"locale": "cpp",
|
||||||
|
"queue": "cpp",
|
||||||
|
"stack": "cpp"
|
||||||
|
}
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
#include "Animation.h"
|
#include "Animation.h"
|
||||||
#include "olcUTIL_Animate2D.h"
|
#include "olcUTIL_Animate2D.h"
|
||||||
#include "Monster.h"
|
#include "Monster.h"
|
||||||
|
#include "DEFINES.h"
|
||||||
|
|
||||||
struct Bullet{
|
struct Bullet{
|
||||||
friend class Crawler;
|
friend class Crawler;
|
||||||
|
@ -290,7 +290,7 @@ bool Wizard::AutoAttack(){
|
|||||||
bool Wizard::Ability1(){
|
bool Wizard::Ability1(){
|
||||||
ACCESS_PLAYER
|
ACCESS_PLAYER
|
||||||
float angleToCursor=atan2(game->GetWorldMousePos().y-p.pos.y,game->GetWorldMousePos().x-p.pos.x);
|
float angleToCursor=atan2(game->GetWorldMousePos().y-p.pos.y,game->GetWorldMousePos().x-p.pos.x);
|
||||||
PLAYER_BULLET_LIST.push_back(std::make_unique<FireBolt>(FireBolt(p.pos,{cos(angleToCursor)*200,sin(angleToCursor)*200},12,p.GetAttack(),true,{240,120,60})));
|
PLAYER_BULLET_LIST.push_back(std::make_unique<FireBolt>(FireBolt(p.pos,{cos(angleToCursor)*275,sin(angleToCursor)*275},12,p.GetAttack(),true,{240,120,60})));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "TSXParser.h"
|
#include "TSXParser.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
#include "DEFINES.h"
|
#include "DEFINES.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
INCLUDE_CLASS_DATA
|
INCLUDE_CLASS_DATA
|
||||||
|
|
||||||
@ -576,8 +577,8 @@ void Crawler::UpdateCamera(float fElapsedTime){
|
|||||||
lastWorldShakeAdjust=std::max(0.f,lastWorldShakeAdjust-fElapsedTime);
|
lastWorldShakeAdjust=std::max(0.f,lastWorldShakeAdjust-fElapsedTime);
|
||||||
if(worldShakeTime-fElapsedTime>0){
|
if(worldShakeTime-fElapsedTime>0){
|
||||||
if(lastWorldShakeAdjust==0){
|
if(lastWorldShakeAdjust==0){
|
||||||
lastWorldShakeAdjust=float(rand()%int(WORLD_SHAKE_ADJUST_MAX_TIME*1000))/1000+0.05;
|
lastWorldShakeAdjust=util::random(0.2)+0.05;
|
||||||
worldShakeVel={float(rand()%1000)/1000*100-50,float(rand()%1000)/1000*100-50};
|
worldShakeVel={util::random(300)-150,util::random(300)-150};
|
||||||
}
|
}
|
||||||
worldShake+=worldShakeVel*fElapsedTime;
|
worldShake+=worldShakeVel*fElapsedTime;
|
||||||
} else {
|
} else {
|
||||||
@ -827,6 +828,9 @@ void Crawler::RenderHud(){
|
|||||||
FillRectDecal(vf2d{11,ScreenHeight()-21.f}-vf2d{0,float(offset)},{62,4},DARK_GREY);
|
FillRectDecal(vf2d{11,ScreenHeight()-21.f}-vf2d{0,float(offset)},{62,4},DARK_GREY);
|
||||||
GradientFillRectDecal(vf2d{10,ScreenHeight()-22.f}-vf2d{0,float(offset)},{(a.cooldown/a.COOLDOWN_TIME)*64,6},a.barColor1,a.barColor1,a.barColor2,a.barColor2);
|
GradientFillRectDecal(vf2d{10,ScreenHeight()-22.f}-vf2d{0,float(offset)},{(a.cooldown/a.COOLDOWN_TIME)*64,6},a.barColor1,a.barColor1,a.barColor2,a.barColor2);
|
||||||
DrawRotatedShadowStringPropDecal(vf2d{8,ScreenHeight()-20.f}+vf2d{1,1}-vf2d{0,float(offset)},capitalize(a.name),-PI/64,{0,0},WHITE,BLACK,{0.4,0.4},0.5);
|
DrawRotatedShadowStringPropDecal(vf2d{8,ScreenHeight()-20.f}+vf2d{1,1}-vf2d{0,float(offset)},capitalize(a.name),-PI/64,{0,0},WHITE,BLACK,{0.4,0.4},0.5);
|
||||||
|
std::stringstream cooldownTimeDisplay;
|
||||||
|
cooldownTimeDisplay<<std::fixed<<std::setprecision(1)<<a.cooldown;
|
||||||
|
DrawShadowStringPropDecal(vf2d{74,ScreenHeight()-22.f+1}-vf2d{float(GetTextSizeProp(cooldownTimeDisplay.str()).x*0.5),float(offset)},cooldownTimeDisplay.str(),WHITE,BLACK,{0.5,0.5});
|
||||||
}
|
}
|
||||||
offset-=6;
|
offset-=6;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ bool FireBolt::MonsterHit(Monster& monster)
|
|||||||
for(int i=0;i<72;i++){
|
for(int i=0;i<72;i++){
|
||||||
game->AddEffect(Effect(monster.GetPos(),util::random(0.5),AnimationState::DOT_PARTICLE,util::random(2),util::random(0.4),{util::random(300)-150,util::random(300)-150},{255,uint8_t(util::random(190)+60),60}));
|
game->AddEffect(Effect(monster.GetPos(),util::random(0.5),AnimationState::DOT_PARTICLE,util::random(2),util::random(0.4),{util::random(300)-150,util::random(300)-150},{255,uint8_t(util::random(190)+60),60}));
|
||||||
}
|
}
|
||||||
|
game->SetupWorldShake(0.5);
|
||||||
for(Monster&m:MONSTER_LIST){
|
for(Monster&m:MONSTER_LIST){
|
||||||
if(geom2d::line(monster.GetPos(),m.GetPos()).length()<=2.5*24){
|
if(geom2d::line(monster.GetPos(),m.GetPos()).length()<=2.5*24){
|
||||||
m.Hurt(3*damage);
|
m.Hurt(3*damage);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user