Skip to content

Commit

Permalink
Couple of Fixes and Feature Updates
Browse files Browse the repository at this point in the history
Added COMBAT_PARALYZE_CANSWING flag.
  • Loading branch information
xwerswoodx committed Oct 7, 2023
1 parent 2e7a3b4 commit 8d758da
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3369,4 +3369,5 @@ Additionally, the problem of zig-zag issue following in the South direction has
SRC: The player who is inviting.
Return 1: Cancels the action.
- Added: LOCAL.SOUND and LOCAL.ANIM under @Start (Skill) and @SkillStart triggers to override sound and animations before start crafting or gathering.
- Fixed: FACTION property not saved and load correctly under [CHARDEF] definition. (Issue: #1059 and #1083)
- Fixed: FACTION property not saved and load correctly under [CHARDEF] definition. (Issue: #1059 and #1083)
- Added: Added COMBAT_PARALYZE_CANSWING (080000) to combat flags to let characters continue attack while paralyzed like old behaviour.
3 changes: 2 additions & 1 deletion src/game/CServerConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ enum COMBATFLAGS_TYPE
COMBAT_ANIM_HIT_SMOOTH = 0x10000, // The hit animation has the same duration as the swing delay, instead of having a fixed fast duration and being idle until the delay has expired.
// WARNING: doesn't work with Gargoyles due to the new animation packet not accepting a custom animation duration!
COMBAT_FIRSTHIT_INSTANT = 0x20000, // The first hit in a fight doesn't wait for the recoil time (OSI like)
COMBAT_NPC_BONUSDAMAGE = 0x40000 // NPC will get full bonus damage from various sources.
COMBAT_NPC_BONUSDAMAGE = 0x40000, // NPC will get full bonus damage from various sources.
COMBAT_PARALYZE_CANSWING = 0x80000 // Characters can continue attacking while paralyzed. (Old sphere behaviour)
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/game/chars/CCharFight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ WAR_SWING_TYPE CChar::Fight_CanHit(CChar * pCharSrc, bool fSwingNoRange)
// We can't hit them right now. Because we can't see them or reach them (invis/hidden).
// Why the target is freeze we are change the attack type to swinging? Player can still attack paralyzed or sleeping characters.
// We make sure that the target is freeze or sleeping must wait ready for attack!
else if ( (pCharSrc->IsStatFlag(STATF_HIDDEN | STATF_INVISIBLE | STATF_SLEEPING)) || (IsStatFlag(STATF_FREEZE | STATF_SLEEPING)) ) // STATF_FREEZE | STATF_SLEEPING
else if ( (pCharSrc->IsStatFlag(STATF_HIDDEN | STATF_INVISIBLE | STATF_SLEEPING)) || (IsStatFlag(STATF_FREEZE) && (!IsSetCombatFlags(COMBAT_PARALYZE_CANSWING))) || (IsStatFlag(STATF_SLEEPING)) ) // STATF_FREEZE | STATF_SLEEPING
{
return WAR_SWING_SWINGING;
}
Expand Down
17 changes: 9 additions & 8 deletions src/sphere.ini
Original file line number Diff line number Diff line change
Expand Up @@ -373,18 +373,19 @@ SuppressCapitals=0
// COMBAT_ELEMENTAL_ENGINE 00008 // Use DAM*/RES* to split damage/resist into Physical/Fire/Cold/Poison/Energy (AOS) instead use old AR (pre-AOS)
// COMBAT_DCLICKSELF_UNMOUNTS 00020 // Unmount horse when dclicking self while in warmode
// COMBAT_ALLOWHITFROMSHIP 00040 // Allow attacking opponents from ships
// COMBAT_NOPETDESERT 00080 // Allow pet owner attack own pet without make it desert its owner
// COMBAT_NOPETDESERT 00080 // Allow pet owner attack own pet without make it desert its owner
// COMBAT_ARCHERYCANMOVE 00100 // Allow firing bow while moving
// COMBAT_STAYINRANGE 00200 // Abort attack swing when out of range instead of waiting to come back in range
// COMBAT_STACKARMOR 01000 // If a region is covered by more than one armor part, all AR will count
// COMBAT_NOPOISONHIT 02000 // Disables old (55i like) poisoning style (0~100% chance based on Poisoning skill for monsters, or 50% chance for poisoned weapons)
// COMBAT_SLAYER 04000 // Enables Slayer damage PVM combat
// COMBAT_SWING_NORANGE 08000 // The hit can be started at any distance and regardless of the Line of Sight, then the damage will be dealt when in range and LoS
// // WARNING: This flag is ignored if PREHIT is on!
// COMBAT_ANIM_HIT_SMOOTH 010000 // The hit animation has the same duration as the swing delay, instead of having a fixed fast duration and being idle until the delay has expired.
// // WARNING: doesn't work with Gargoyles due to the new animation packet not accepting a custom animation duration!
// COMBAT_FIRSTHIT_INSTANT 020000 // The first hit in a fight doesn't wait for the recoil time (OSI like)
// COMBAT_NPC_BONUSDAMAGE 040000 // Npc get bonus damage from various sources such as CombatBonus, CombatBonusPercent, IncreaseDam, Anatomy, Tactics etc. See revision from 12-11-2019 for more details.
// COMBAT_SLAYER 04000 // Enables Slayer damage PVM combat
// COMBAT_SWING_NORANGE 08000 // The hit can be started at any distance and regardless of the Line of Sight, then the damage will be dealt when in range and LoS
// // WARNING: This flag is ignored if PREHIT is on!
// COMBAT_ANIM_HIT_SMOOTH 010000 // The hit animation has the same duration as the swing delay, instead of having a fixed fast duration and being idle until the delay has expired.
// // WARNING: doesn't work with Gargoyles due to the new animation packet not accepting a custom animation duration!
// COMBAT_FIRSTHIT_INSTANT 020000 // The first hit in a fight doesn't wait for the recoil time (OSI like)
// COMBAT_NPC_BONUSDAMAGE 040000 // Npc get bonus damage from various sources such as CombatBonus, CombatBonusPercent, IncreaseDam, Anatomy, Tactics etc. See revision from 12-11-2019 for more details.
// COMBAT_PARALYZE_CANSWING 080000 // Characters can continue attacking while paralyzed. (Old sphere behaviour)
//CombatFlags=0

// If COMBAT_ARCHERYCANMOVE is not enabled, wait this much tenth of seconds (minimum=0) after the player
Expand Down

0 comments on commit 8d758da

Please sign in to comment.