Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.3.0 #846

Merged
merged 253 commits into from
Oct 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
bbfa9c7
* refactor monster animate into function
Mar 15, 2024
432daf8
* wip
Mar 15, 2024
69c7c35
* mergy
Mar 15, 2024
027ffdf
* tutorial_scores - fix for corrupted files, fix for nx writing not a…
Mar 15, 2024
37f8150
* mergy
Mar 15, 2024
9f08bd8
* dump cache before book reload as causes issues with alternate .ttf …
Mar 17, 2024
415cb6b
* fix left click bind closing signs immediately
Mar 17, 2024
db226ae
* don't gen mimic on vampire quest chest
Mar 18, 2024
8b431cd
* fix starvation not occurring for hunger multipliers
Mar 30, 2024
4d8439b
* compedium stuff
Apr 7, 2024
d842509
* fix list node nullptr crash
Apr 7, 2024
1753792
* item compendium stuff
Apr 20, 2024
8da42c3
* fix insectoid seed event text not updating
Apr 22, 2024
792be36
* wip items
May 6, 2024
0a8f498
* compendium world events, refactor getSpellFromItem
Jun 7, 2024
bad113a
* editor can take xres/yres as arguments because scaling is broken
Jun 7, 2024
49200d2
* more lang
Jun 7, 2024
69d94b9
* misc lang update
Jun 7, 2024
bf60087
* misc compendium event fixes
Jun 19, 2024
2eebd61
* monster recruit event for compendium
Jun 19, 2024
eacafff
* editor fix selected tile display
Jun 19, 2024
15b4df8
* compendium camera customising
Jun 28, 2024
98b9bb4
* fix monster curve generation
Jun 28, 2024
5f8107e
* small fix
Jun 28, 2024
936c70e
* fix weight display not using getCharacterWeight()
Jul 9, 2024
d5d55d7
* codex records mostly wrapped
Jul 9, 2024
c0661f9
* add some braces for preventSleepRoll sleep spell
Jul 9, 2024
32d50ab
* Bonus INT for spells now in function
Jul 19, 2024
a787f99
* more compendium codex tag handling
Jul 19, 2024
59eee22
* fix inventory bug holding space and opening activating items
Jul 20, 2024
856a234
* compendium unlocking mechanics
Jul 24, 2024
5580bbc
* ghost compendium animations
Jul 24, 2024
66a41ad
* compendium unlock mainmenu code, shift around stuff
Jul 24, 2024
b789394
* i want it all achievement fix to conjurer/hunter
Jul 29, 2024
8ba349c
* another i want it all condition fix
Jul 29, 2024
fe75484
* sleep spellbook in mystic library toggles between that and magic mi…
Jul 30, 2024
a4ea64d
* controller support 5/6 tabs for compendium
Jul 30, 2024
c46a8d7
* lich death knell sfx only play once in splitscreen
Jul 30, 2024
fdb6104
* bounty hat no longer targets bots
Jul 31, 2024
060e214
* scroll/lorebook/merchant/summon trap events
Aug 1, 2024
9c46e01
* lang file update
Aug 1, 2024
6d5375c
* gitignore update debug folder
Aug 9, 2024
a522028
* much compendium events for magic/tinkering and misc
Aug 9, 2024
46275d3
* lang update
Aug 9, 2024
725bade
* fit splitscreen compendium tooltip
Aug 9, 2024
6129ca2
* lots of compendium ui
Aug 9, 2024
2c82cb9
* lang update
Aug 9, 2024
a5c855f
* add alchemy feature img, line highlights codex world
Aug 9, 2024
61a5658
* fix appraisal not being synced to server
Aug 13, 2024
db4a77f
* compendium add monster lvl, species
Aug 13, 2024
4c2ff43
* touch up monster page formatting, add species
Aug 13, 2024
e5e4e97
* debug open areas, /maplevel2 command to reveal objects on map
Aug 14, 2024
3950bd2
* lang update, monsters fix some sections, amplify magic spellbook na…
Aug 15, 2024
462cf5e
* some fixes for compendium tooltip main menu blocking stats to exclu…
Aug 15, 2024
8234853
* compendium item bless/repair widget, unread indicators
Aug 15, 2024
e84d67a
* compendium tooltip show 0 stats
Aug 15, 2024
92bc5a7
* cheats disable compendium input
Aug 15, 2024
e24083b
* remove some debug msgs for debug_achievements
Aug 15, 2024
8a3468c
* update base debug solution to compile
Aug 15, 2024
a405384
* fix epic achievement card text for achievements > 1 line
Aug 15, 2024
33c9d24
* fix multiplayer negative stats - limit of 248 for stats, 255 LVL
Aug 15, 2024
8abd222
* more player death compendium events fixes
Aug 15, 2024
4ff60d7
* fix compendium tooltip hanging too low
Aug 15, 2024
3f45e60
* character sheet/tooltips fix weapon atk ranges not being displayed …
Aug 15, 2024
a6f4c13
* adjust new unlock button compendium
Aug 15, 2024
a370d53
* update lang
Aug 15, 2024
2c9096a
* formatting add extra bullet pts for codex/world
Aug 15, 2024
2f706bd
* sound updates
Aug 16, 2024
feb25a5
* map hashes, fix cheats disabled
Aug 16, 2024
182652d
* support feature imgs in world compendium section
Aug 16, 2024
72562f2
* breakables (including warning effects for items/monsters inside)
Aug 21, 2024
c8555ac
* breakable map gen
Aug 21, 2024
792df7a
* tooltips for editor - collider/floor shows model mesh name
Aug 21, 2024
25d5fa9
* lang update
Aug 21, 2024
05b34ed
* fix local highscore not being create when host kicks everyone after…
Aug 23, 2024
035ca3a
* arrows/thrown hurt breakables
Aug 23, 2024
41ed101
* another fix for disconnecteds client doing endgame
Aug 23, 2024
5e31c3c
* reveal boss entry on entering their floors, brimstone boulder
Aug 23, 2024
1370345
* fix secret weapon achievement proccing on amplify magic casts
Aug 24, 2024
5cf7a45
* add maces to human spawnlist
Aug 24, 2024
ac5964d
* add thrown potion dmg tracking imrovement
Aug 24, 2024
36bd571
* underworld generate cages over pits
Aug 25, 2024
b7d4816
* fix naked npcs - delay bodypart sending as server
Aug 27, 2024
0f0857a
* compendium arachnophobia models
Aug 27, 2024
b27d4da
* /cleanfloor command
Aug 27, 2024
3b7afcc
* slime business
Aug 27, 2024
986a284
* lang update
Aug 27, 2024
950dfd2
* faster client tooltip requests
Aug 27, 2024
b951c97
* player bodyparts better loading delay
Aug 27, 2024
0033132
* invis items no activate pressure plates
Aug 27, 2024
ce94169
* slime actMonster code, maigc attack
Aug 27, 2024
8f93c70
* fix updateeffects being wrong for client since numeffects update
Aug 30, 2024
71502fb
* sound no play if volume = 0
Aug 30, 2024
d3bf954
* slime spells add
Aug 30, 2024
ee2fc6f
* actplayer weapon sprite wasn't set to 0 when unequipped - hoping no…
Aug 31, 2024
2ad0763
* monster dont slide into doorways when the wall is broken next to it
Aug 31, 2024
4db596f
* slime special atk
Aug 31, 2024
8d8352e
* dithered bright shader for player invis portrait
Aug 31, 2024
6a3841a
* map hash update
Aug 31, 2024
1467b28
* book with no matching name in editor will spawn randomly instead of…
Aug 31, 2024
6776737
* achievements sort unlocked first toggle
Aug 31, 2024
2a98401
* editor stuff - chest mimic chances, AND/NAND gates, pressure plate …
Sep 1, 2024
0a419f9
* herx lich - stub out some code to teleport allies into arena, work …
Sep 1, 2024
fbe382c
* prev commit add missing bit
Sep 1, 2024
1862a6b
* slimes get nametags (also fix tag height for slimes)
Sep 2, 2024
abc3821
* sprays dont hit allies
Sep 2, 2024
f4651e3
* slime spawn types
Sep 2, 2024
220ed20
* lang update
Sep 2, 2024
62d502f
* fix required dlc prompt causing crashes in splitscreen
Sep 2, 2024
0308c78
* show dead prompt in splitscreen
Sep 2, 2024
53f256d
* slime ally name camelcase
Sep 2, 2024
6db4edb
* fmod - torch sounds are now looping rather than instanced
Sep 9, 2024
71ee9aa
* bat adjust callout/hp bar heights to suit body
Sep 9, 2024
e400dda
* compendium open hotkey for keyboard
Sep 9, 2024
b513cc9
* dmg gib for miss, custom dmg gibs now transferred to clients over net
Sep 9, 2024
25e99c0
* bat no charm no poly
Sep 9, 2024
a81d245
* missed a bit for dmg gib miss
Sep 9, 2024
2aa9053
* bat commit
Sep 9, 2024
1c96278
* update path debug msg to include sprite
Sep 9, 2024
8ecbc2f
* slime tweak stats a little, lower dex/hp. add scaling to spray atk
Sep 9, 2024
145391f
* compendium hardcore mode stat calcs
Sep 9, 2024
f50c12e
* tinker bombs - check if entity still alive before spawning a projec…
Sep 9, 2024
72fe9bd
* breakables cycle monster inside if possible, now can spawn more as …
Sep 9, 2024
2bb437d
* water/lava/trap/fountain sfx now loop, cull if <=2 tiles
Sep 10, 2024
7414d84
* ambient trap sounds make loop
Sep 10, 2024
23a2b7d
* water/lava now spawn only 1 sfx while map is active
Sep 10, 2024
0792fc6
* bat reduce chance bleed when blocking
Sep 10, 2024
f6f56a5
* bat no rest on tiles with ceiling models or colliders/furniture for…
Sep 10, 2024
fdfbde8
* reduce frequency monster sounds idling
Sep 10, 2024
1c87833
* can sneak under bat
Sep 10, 2024
528d4b1
* new lang
Sep 10, 2024
3c4b6ca
* slimebushes tweak min distance, fix not deleting old tiles
Sep 10, 2024
3fce8ee
* bats spawn in darkmaps
Sep 10, 2024
83b98ea
* map hash update
Sep 10, 2024
0b1eec6
* fmod set stream to not update automatically, fix perf
Sep 11, 2024
5eb1395
* slime spray reduce reflect degrade chance
Sep 11, 2024
e1ae178
* bat spawn in 2x pairs from breakables
Sep 11, 2024
0b79694
* improve bat hit rates
Sep 11, 2024
1ff438a
* reduce stealth chance on backstab rest bats
Sep 12, 2024
756111c
* lang update
Sep 12, 2024
ebc05f2
* gungnir no miss bat
Sep 12, 2024
17174b4
* update solution
Sep 12, 2024
b8fab36
* debug config.hpp temp stuff
Sep 12, 2024
998e36b
* rename bat enum
Sep 12, 2024
5c32d88
* initial bugbear commit
Sep 24, 2024
5fb6a97
* fix crash to unsanitised player names in lobby chat/callouts/npc di…
Sep 24, 2024
ab6cc3d
* fix ally rotating crazy when backing up with range weapon
Sep 24, 2024
f7736ce
* bats add some minor STR/DEX scaling, fix miss chance being backwards
Sep 24, 2024
ab4a1ab
* vampires 2x slime water dmg, rearrange a equip degrade func check
Sep 24, 2024
2996d2c
* bugbear atk logic
Sep 24, 2024
27d10bd
* solution update
Sep 24, 2024
f059924
* bat bit more scaling HP, bugbear bit more CON, taunt sound on defen…
Sep 24, 2024
1f647f7
* bugbear add defend if not in ranged dist
Sep 29, 2024
c17cc16
* fix npc interact cant target items
Sep 29, 2024
989c57b
* gnome update limbs
Sep 29, 2024
a2d5164
* remove deprecated bit of steel helm code for goblins
Sep 29, 2024
fb8bf93
* ruins maps misc hashes
Sep 29, 2024
60f81a1
* bugbear more likely shield from 50% to 66%
Sep 29, 2024
9762af5
* gnome part1
Sep 29, 2024
758179d
* gnome adjust limbs/height, adjust some droptables
Oct 10, 2024
197fbed
* map hash update
Oct 10, 2024
9a95bc5
* misc bugfixes
Oct 10, 2024
2d6e4f5
* slight dim compendium not researched entries
Oct 10, 2024
02a5ca0
* lang update
Oct 10, 2024
dd6d818
* caves map hash
Oct 15, 2024
693965a
* stop projectile double hit then miss evasion targets
Oct 15, 2024
2c5780a
* individual slimes to editor
Oct 15, 2024
9dd9e04
* var cleanup
Oct 15, 2024
26b299b
* bell/daedalus map spawns
Oct 15, 2024
dfa41ea
* daedalus particle, minimap highlight, damage gib refactor to draw a…
Oct 15, 2024
06ce1c7
* new obituaries, gib stuff from previous commit, bell/daedalus inter…
Oct 15, 2024
062f3b1
* minotaur longer arrive on mines.labyrinth,
Oct 15, 2024
203ab8e
* bell behavior, evasion for players, miss messages
Oct 15, 2024
6b064fa
* footstep noises - ignore some odd clicking sounds
Oct 15, 2024
4ac0504
* fix player obituary not being % sanitised
Oct 15, 2024
b5c0fce
* daedalus shrine behavior
Oct 15, 2024
20335fc
* bell noclip creatures
Oct 15, 2024
97d1ce5
* lang update
Oct 15, 2024
62154a2
* bell add new note sprites
Oct 16, 2024
18299f4
* agility effect increase to +5 / 25% and 30% evade
Oct 16, 2024
b39eabb
* end bell effect msgs
Oct 16, 2024
58a24c7
* lobby shows visibility floating status
Oct 16, 2024
26a815e
* bell add heal effect, burning interaction
Oct 16, 2024
c8892f1
* bell spawn citadel, add burnable tag, reduce size of rope
Oct 16, 2024
af47b8b
* flaming creatures can touch bell rope
Oct 16, 2024
b9e8dec
* bat harder to raise block
Oct 16, 2024
4ef9790
* debug stuffs
Oct 17, 2024
741a7d5
* /player_can_move_in_gui variable to prevent movement in inventory
Oct 17, 2024
0227cdc
* gnome thief compendium stuff - increase lvl to 10, add custom names
Oct 17, 2024
99b4bcb
* daedalus/bell/container compendium
Oct 17, 2024
15d1ba6
* container compendium entries hide if not unlocked area
Oct 17, 2024
a198e9d
* enchant armor/weapon scrolls now targetable, add a check to the net…
Oct 17, 2024
da299e7
* spellbook/shield changes
Oct 17, 2024
f0474f1
* hell map hashes
Oct 17, 2024
d427635
* /hell_baphoexit cmd to test hell secret exit
Oct 17, 2024
1984fb1
*new langs
Oct 17, 2024
81ba7b7
* gnome thieves use own sound effect entries to normal for scarony
Oct 18, 2024
8373a3e
* hazard goggles prevent slime secondary effects, hell boss adds no d…
Oct 18, 2024
702f2a3
* setup spells clear allGameSpells when called to prevent dupes
Oct 18, 2024
175a346
* baphoexit map hash
Oct 18, 2024
bac759d
* baphoexit remove console command, default behavior
Oct 18, 2024
79c81d8
* add bronze shield to degrade prevention rolls
Oct 18, 2024
ca4df09
* disable bapho mob miniboss %
Oct 19, 2024
c645fe3
* guild compendium records
Oct 19, 2024
385fea2
* fix chest lids opened compendium record
Oct 19, 2024
24cf7b0
* blocking skill page show new offhand calc
Oct 19, 2024
d2bc136
* refactor stats->appearance to stat_appearance avoid item->appearanc…
Oct 19, 2024
876ad0d
* merge master
Oct 19, 2024
ef3f9df
* fix duplicate lang warning and username not being set on load for nx
Oct 19, 2024
e04c1a4
* bell dmg 80, new achievements
Oct 20, 2024
d60181b
* add limit to baphomet ally xp drops
Oct 20, 2024
f984611
* mace slightly more effective breaking shields while defending
Oct 20, 2024
5ba162a
* kobold reduce idle noise freq, dont overlap
Oct 20, 2024
ace724a
* XP text in top bar can support more than 2 characters for XP text
Oct 20, 2024
4f77249
* lang update
Oct 20, 2024
6b925a5
Merge pull request #840 from TurningWheel/master
WALLOFJUSTICE Oct 20, 2024
97e445b
* game version bump
Oct 20, 2024
15c5208
Merge pull request #841 from WALLOFJUSTICE/dev-23-q3-2
WALLOFJUSTICE Oct 20, 2024
bf98737
* fix compile error fpermissive
Oct 20, 2024
9fde0d9
Merge pull request #842 from WALLOFJUSTICE/dev-23-q3-2
WALLOFJUSTICE Oct 20, 2024
e18898c
* cmakelists update
Oct 20, 2024
fbbf02e
Merge pull request #843 from WALLOFJUSTICE/dev-23-q3-2
WALLOFJUSTICE Oct 20, 2024
7d0b257
* compendium translations to their own files
Oct 21, 2024
e2cca6c
* merchant 1->3 remove curse, add 2 scrolls identify
Oct 22, 2024
bb1e2e1
* intro level slow hunger
Oct 22, 2024
b0e29dd
* hunger disabled modifiers can increase HP regen
Oct 22, 2024
bf411df
* mapseed now uses custom seed fixed rng, /map_sequence_rng to toggle…
Oct 22, 2024
651b7d9
* double shield durability rng
Oct 22, 2024
017677d
* starvation is now 5% maxhp
Oct 22, 2024
a75fa86
* insectoid max mp is 100 from 50
Oct 22, 2024
470e807
* rhythm of the knight procs on taking damage too, remove skilled blo…
Oct 22, 2024
bce1fda
* insectoid food only scales up til base 50 mp
Oct 22, 2024
84ddee0
* blocking within .3sec adds bonus roll to shield skill proc, arrows …
Oct 22, 2024
354c156
* quickturn console command
Oct 22, 2024
ce0bd47
* hunger of 0 removes hp regen
Oct 22, 2024
3f3ec97
* fix editor, lang update
Oct 22, 2024
c3e8973
* player cursed traps explode randomly, no drop detonator
Oct 22, 2024
7ac1a97
* gnomes reduce base +100 gold from lightning gnomes, add rng to not …
Oct 22, 2024
20ff975
* maybe fix burning bell rope when invis
Oct 22, 2024
2136855
* bats harder to raise block, block increase roll required scaling wi…
Oct 22, 2024
e7c2fe3
* thank the tank achievement grants shield procs
Oct 22, 2024
fc9b84c
* quick turn controls setting
Oct 23, 2024
81a1f36
* thank the tank can handle multiple enemies and arrow attacks, rhyth…
Oct 23, 2024
67cb416
Merge pull request #844 from WALLOFJUSTICE/dev-23-q3-2
WALLOFJUSTICE Oct 23, 2024
de0e165
* torch prevent skill increase above 40, add missing checks
Oct 23, 2024
fca021e
* custom banners.json for update notes
Oct 23, 2024
cb3c469
* update global stats
Oct 23, 2024
c238b00
* track version number
Oct 23, 2024
eb956cb
* polymorph preserves charmed status
Oct 23, 2024
039e4f9
Merge pull request #845 from WALLOFJUSTICE/dev-23-q3-2
WALLOFJUSTICE Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
* blocking within .3sec adds bonus roll to shield skill proc, arrows …
…can increase/degrade shield too
WALL OF JUSTICE committed Oct 22, 2024
commit 84ddee026ba9f6bbbb86381fd8855fde79998fc7
186 changes: 184 additions & 2 deletions src/actarrow.cpp
Original file line number Diff line number Diff line change
@@ -1215,7 +1215,189 @@ void actArrow(Entity* my)
}
}

if ( damage == 0 && !statusEffectApplied )
bool armorDegraded = false;

// hit armor degrade
if ( hitstats && parent && parent->getStats() )
{
Item* armor = NULL;
int armornum = 0;
bool isWeakArmor = false;
if ( damage > 0 || (damage == 0 && !(hitstats->shield && hitstats->defending)) )
{
armornum = hitstats->pickRandomEquippedItemToDegradeOnHit(&armor, true, false, false, true);
if ( armor != NULL && armor->status > BROKEN )
{
switch ( armor->type )
{
case CRYSTAL_HELM:
case CRYSTAL_SHIELD:
case CRYSTAL_BREASTPIECE:
case CRYSTAL_BOOTS:
case CRYSTAL_GLOVES:
isWeakArmor = true;
break;
default:
isWeakArmor = false;
break;
}
}

int armorDegradeChance = 30;
if ( isWeakArmor )
{
armorDegradeChance = 25;
}
if ( hitstats->type == GOBLIN )
{
armorDegradeChance += 10;
}

if ( armorDegradeChance == 100 || (local_rng.rand() % armorDegradeChance > 0) )
{
armor = NULL;
armornum = 0;
}
}

// if nothing chosen to degrade, check extra shield chances to degrade
if ( hitstats->shield != NULL && hitstats->shield->status > BROKEN && armor == NULL
&& !itemTypeIsQuiver(hitstats->shield->type) && itemCategory(hitstats->shield) != SPELLBOOK
&& hitstats->shield->type != TOOL_TINKERING_KIT )
{
if ( hitstats->shield->type == TOOL_CRYSTALSHARD && hitstats->defending )
{
// shards degrade by 1 stage each hit.
armor = hitstats->shield;
armornum = 4;
}
else if ( hitstats->shield->type == MIRROR_SHIELD && hitstats->defending )
{
// mirror shield degrade by 1 stage each hit.
armor = hitstats->shield;
armornum = 4;
}
{
// if no armor piece was chosen to break, grant chance to improve shield skill.
if ( itemCategory(hitstats->shield) == ARMOR
|| (hitstats->defending) )
{
int roll = 20;
if ( damage == 0 )
{
roll /= 2;
}
if ( roll > 0 )
{
bool success = (local_rng.rand() % roll == 0);
if ( !success && hit.entity->behavior == &actPlayer && hitstats->defending )
{
if ( players[hit.entity->skill[2]]->mechanics.defendTicks != 0 )
{
if ( (::ticks - players[hit.entity->skill[2]]->mechanics.defendTicks) < (TICKS_PER_SECOND / 3) )
{
// perfect block timing, roll again
success = (local_rng.rand() % roll == 0);
}
}
}

if ( success )
{
bool increaseSkill = true;
if ( hit.entity->behavior == &actPlayer && parent->behavior == &actPlayer )
{
increaseSkill = false;
}
else if ( hit.entity->behavior == &actPlayer && parent->monsterAllyGetPlayerLeader() )
{
increaseSkill = false;
}
else if ( hit.entity->behavior == &actPlayer
&& !players[hit.entity->skill[2]]->mechanics.allowedRaiseBlockingAgainstEntity(*parent) )
{
increaseSkill = false;
}
else if ( hitstats->EFFECTS[EFF_SHAPESHIFT] )
{
increaseSkill = false;
}
else if ( itemCategory(hitstats->shield) != ARMOR
&& hitstats->getProficiency(PRO_SHIELD) >= SKILL_LEVEL_SKILLED )
{
increaseSkill = false; // non-shield offhands dont increase skill past 40.
}
if ( increaseSkill )
{
hit.entity->increaseSkill(PRO_SHIELD); // increase shield skill
if ( hit.entity->behavior == &actPlayer )
{
players[hit.entity->skill[2]]->mechanics.enemyRaisedBlockingAgainst[parent->getUID()]++;
}
}
}
}
}

// shield still has chance to degrade after raising skill.
int shieldDegradeChance = 20;
if ( svFlags & SV_FLAG_HARDCORE )
{
shieldDegradeChance = 40;
}
if ( hitstats->type == GOBLIN )
{
shieldDegradeChance += 10;
}
if ( hit.entity->behavior == &actPlayer )
{
if ( itemCategory(hitstats->shield) == ARMOR )
{
shieldDegradeChance += 2 * (hitstats->getModifiedProficiency(PRO_SHIELD) / 10); // 2x shield bonus offhand
if ( !players[hit.entity->skill[2]]->mechanics.itemDegradeRoll(hitstats->shield) )
{
shieldDegradeChance = 100; // don't break.
}
}
else
{
shieldDegradeChance += (hitstats->getModifiedProficiency(PRO_SHIELD) / 10);
}
if ( skillCapstoneUnlocked(hit.entity->skill[2], PRO_SHIELD) )
{
shieldDegradeChance = 100; // don't break.
}
}
if ( shieldDegradeChance < 100 && armor == NULL &&
(hitstats->defending && local_rng.rand() % shieldDegradeChance == 0)
)
{
armor = hitstats->shield;
armornum = 4;
}
}
}

if ( armor != NULL && armor->status > BROKEN )
{
hit.entity->degradeArmor(*hitstats, *armor, armornum);
armorDegraded = true;
if ( armor->status == BROKEN )
{
if ( parent && parent->behavior == &actPlayer && hit.entity->behavior == &actMonster )
{
steamStatisticUpdateClient(parent->skill[2], STEAM_STAT_UNSTOPPABLE_FORCE, STEAM_STAT_INT, 1);
if ( armornum == 4 && hitstats->type == BUGBEAR
&& (hitstats->defending || hit.entity->monsterAttack == MONSTER_POSE_BUGBEAR_SHIELD) )
{
steamAchievementClient(parent->skill[2], "BARONY_ACH_BEAR_WITH_ME");
}
}
}
}
}

if ( damage == 0 && !statusEffectApplied && !armorDegraded )
{
playSoundEntity(hit.entity, 66, 64); //*tink*
if ( hit.entity->behavior == &actPlayer )
@@ -1241,7 +1423,7 @@ void actArrow(Entity* my)
}
}
}
else if ( damage == 0 && statusEffectApplied )
else if ( damage == 0 && (statusEffectApplied || armorDegraded) )
{
playSoundEntity(hit.entity, 28, 64);
}
Loading