All Warrior abilities now cancel casts. Added in a small velocity threshold where the player can regain control via movement after getting bumped around. Release Version 8193.
This commit is contained in:
parent
7608e9dfe2
commit
6ee3518c58
@ -422,7 +422,7 @@ void AiL::HandleUserInput(float fElapsedTime){
|
||||
if(KEY_MENU.Released()){
|
||||
Menu::OpenMenu(MenuType::PAUSE);
|
||||
}
|
||||
if(player->GetVelocity()==vf2d{0,0}&&player->CanMove()){
|
||||
if(player->GetVelocity().mag()<"Player.Move Allowed Velocity Lower Limit"_F&&player->CanMove()){
|
||||
auto GetPlayerStaircaseDirection=[&](){
|
||||
for(LayerTag&layer:MAP_DATA[GetCurrentLevel()].LayerData){
|
||||
int truncatedPlayerX=int(player->GetX())/game->GetCurrentMapData().tilewidth;
|
||||
|
@ -806,6 +806,10 @@ void Player::CancelCast(){
|
||||
if(wasCasting){
|
||||
DAMAGENUMBER_LIST.push_back(std::make_shared<DamageNumber>(GetPos(),0,true,INTERRUPT));
|
||||
}
|
||||
if(state==State::CASTING){
|
||||
state=State::NORMAL;
|
||||
castPrepAbility->waitForRelease=true;
|
||||
}
|
||||
}
|
||||
|
||||
void Player::Moved(){
|
||||
|
@ -21,4 +21,6 @@ Add hotkeys to loadout slots when selecting them from the menu
|
||||
When Blacksmith is unlocked, camp notification is reset
|
||||
Allow Block to interrupt casts (Bandages)
|
||||
|
||||
Pressing any skill overrides an item's cast....?
|
||||
Pressing any skill overrides an item's cast....?
|
||||
|
||||
Fix Story setpieces (outer tiles)
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 5
|
||||
#define VERSION_PATCH 1
|
||||
#define VERSION_BUILD 8187
|
||||
#define VERSION_BUILD 8193
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
@ -106,7 +106,7 @@ void Warrior::InitializeClassAbilities(){
|
||||
#pragma region Warrior Right-click Ability (Block)
|
||||
Warrior::rightClickAbility.action=
|
||||
[](Player*p,vf2d pos={}){
|
||||
if(p->GetState()==State::NORMAL){
|
||||
if(p->GetState()==State::NORMAL||p->GetState()==State::CASTING){
|
||||
rightClickAbility.cooldown=rightClickAbility.COOLDOWN_TIME;
|
||||
p->SetState(State::BLOCK);
|
||||
p->blockTimer="Warrior.Right Click Ability.Duration"_F;
|
||||
|
@ -23,6 +23,9 @@ Player
|
||||
# How much speed the player loses while no momentum is being added.
|
||||
Friction = 400
|
||||
|
||||
# How low the velocity has to be before the player has control again from being bumped around.
|
||||
Move Allowed Velocity Lower Limit = 30.0
|
||||
|
||||
# How many of any one type of item we can bring to the battlefield max per slot.
|
||||
Item Loadout Limit = 10
|
||||
|
||||
|
@ -18,7 +18,7 @@ Warrior
|
||||
Range = 150
|
||||
Cooldown = 0.35
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 0
|
||||
CancelCast = 1
|
||||
|
||||
SwordSwingTime = 0.2
|
||||
}
|
||||
@ -30,7 +30,7 @@ Warrior
|
||||
Cooldown = 15
|
||||
Mana Cost = 0
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 0
|
||||
CancelCast = 1
|
||||
|
||||
Description = Blocks incoming damage for a brief period of time.
|
||||
|
||||
@ -55,7 +55,7 @@ Warrior
|
||||
Cooldown = 12
|
||||
Mana Cost = 35
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 0
|
||||
CancelCast = 1
|
||||
|
||||
Description = A Battlecry that boosts the Warrior's Damage and Defense capabilities for some time.
|
||||
|
||||
@ -103,7 +103,7 @@ Warrior
|
||||
Cooldown = 15
|
||||
Mana Cost = 50
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 0
|
||||
CancelCast = 1
|
||||
|
||||
Description = Leaps and then dives into the ground, knocking back and destroying everything nearby in the process.
|
||||
|
||||
@ -144,7 +144,7 @@ Warrior
|
||||
Cooldown = 40
|
||||
Mana Cost = 60
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 0
|
||||
CancelCast = 1
|
||||
|
||||
Description = A large sonic wave projectile is released from the Warrior's sword.
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user