diff --git a/data/js/combat/leechstats.js b/data/js/combat/leechstats.js new file mode 100644 index 000000000..fc1086fdf --- /dev/null +++ b/data/js/combat/leechstats.js @@ -0,0 +1,56 @@ +function onEquip( pEquipper, iEquipped ) +{ + pEquipper.AddScriptTrigger( 7003 ); +} + +// Remove script trigger on unequip +function onUnequip( pUnequipper, iUnequipped ) +{ + pUnequipper.RemoveScriptTrigger( 7003 ); +} + +function onDamageDeal( attacker, damaged, damageValue, damageType ) +{ + // Fetch weapon in main hand or secondary hand + var iWeapon = attacker.FindItemLayer( 0x01 ); + if( !ValidateObject( iWeapon )) + { + iWeapon = attacker.FindItemLayer( 0x02 ); + } + + if( ValidateObject( iWeapon )) + { // Apply leech effects based on weapon properties + ApplyLeech( attacker, damaged, damageValue, iWeapon, 'healthLeech', 30 ); + ApplyLeech( attacker, damaged, damageValue, iWeapon, 'staminaLeech', 100 ); + ApplyLeech( attacker, damaged, damageValue, iWeapon, 'manaLeech', 40 ); + } + + return true; +} + +function ApplyLeech( attacker, damaged, damageValue, weapon, leechType, multiplier ) +{ + // Get the leech amount for the specified leech type from the weapon + var leechPercentVal = weapon[ leechType ]; + if( leechPercentVal > 0 ) + { + // Calculate the percent of health restored to the attacker + var leechAmt = Math.round( damageValue * ( leechPercentVal / 100 ) * ( multiplier/100 )); + + // Apply the leech effect based on the leech type + switch( leechType ) + { + case 'healthLeech': + attacker.Heal( leechAmt ); + break; + case 'staminaLeech': + attacker.stamina += leechAmt; + break; + case 'manaLeech': + attacker.mana += leechAmt; + break; + } + + attacker.SoundEffect( 0x44D, true ); + } +} \ No newline at end of file diff --git a/data/js/jse_fileassociations.scp b/data/js/jse_fileassociations.scp index ceeac4c36..bc7439ccc 100644 --- a/data/js/jse_fileassociations.scp +++ b/data/js/jse_fileassociations.scp @@ -334,6 +334,7 @@ // Combat Scripts [7000-7499] //------------------------------------------- 7000=combat/peacemake_effect.js +7003=combat/leechstats.js //------------------------------------------- // Misc Player Scripts [8000-8499] diff --git a/source/CPacketSend.cpp b/source/CPacketSend.cpp index 5f266e059..961323651 100644 --- a/source/CPacketSend.cpp +++ b/source/CPacketSend.cpp @@ -7473,6 +7473,28 @@ void CPToolTip::CopyItemData( CItem& cItem, size_t &totalStringLen, bool addAmou tempEntry.ourText = oldstrutil::number( cItem.GetTempVar( CITV_MOREZ )); FinalizeData( tempEntry, totalStringLen ); } + + if( cItem.GetManaLeech() > 0 ) + { + tempEntry.stringNum = 1060427; // hit mana leech ~1_val~% + tempEntry.ourText = oldstrutil::number( cItem.GetManaLeech() ); + FinalizeData( tempEntry, totalStringLen ); + } + + if( cItem.GetStaminaLeech() > 0 ) + { + tempEntry.stringNum = 1060430; // hit stamina leech ~1_val~% + tempEntry.ourText = oldstrutil::number( cItem.GetStaminaLeech() ); + FinalizeData( tempEntry, totalStringLen ); + } + + if( cItem.GetHealthLeech() > 0 ) + { + tempEntry.stringNum = 1060422; // hit life leech ~1_val~% + tempEntry.ourText = oldstrutil::number( cItem.GetHealthLeech() ); + FinalizeData( tempEntry, totalStringLen ); + } + if( cItem.GetType() == IT_SPELLCHANNELING ) { tempEntry.stringNum = 1060482; // spell channeling diff --git a/source/Changelog.txt b/source/Changelog.txt index 0e0caac46..ee8b02ae1 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,12 @@ +18/06/2024 - Dragon Slayer + Added three new DFN tags for Items: + HEALTHLEECH=# // It gives an attacker the ability to leech health from his opponent every time he successfully delivers a hit adds it to himself. + STAMINALEECH=# // It gives an attacker the ability to leech Stamina from his opponent every time he successfully delivers a hit adds it to himself. + MANALEECH=# // It gives an attacker the ability to leech Mana from his opponent every time he successfully delivers a hit adds it to himself. + These are also available as JS Engine object properties: .healthLeech, .staminaLeech and .manaLeech + Added leechstats.js file that controls the combat for the properties. (script 7003) + To add this script to a weapon only. add in SCRIPT=7003, HEALTHLEECH=# or STAMINALEECH=# or MANALEECH=# it can also be all three on the weapon. + 14/06/2024 - Dragon Slayer Added two new DFN tags for Items: HITCHANCE=# // Increases the player's chance to hit a target with wrestling, melee and ranged weapons. diff --git a/source/UOXJSPropertyEnums.h b/source/UOXJSPropertyEnums.h index 6bda6ca60..2c2eb0a80 100644 --- a/source/UOXJSPropertyEnums.h +++ b/source/UOXJSPropertyEnums.h @@ -501,7 +501,9 @@ enum CI_Properties CIP_SECTIONALIST, CIP_MININTERVAL, CIP_MAXINTERVAL, - + CIP_HEALTHLEECH, + CIP_STAMINALEECH, + CIP_MANALEECH, CIP_ISNEWBIE, CIP_ISDISPELLABLE, CIP_MADEWITH, diff --git a/source/UOXJSPropertyFuncs.cpp b/source/UOXJSPropertyFuncs.cpp index d755e91c7..3418eec20 100644 --- a/source/UOXJSPropertyFuncs.cpp +++ b/source/UOXJSPropertyFuncs.cpp @@ -676,6 +676,9 @@ JSBool CItemProps_getProperty( JSContext *cx, JSObject *obj, jsval id, jsval *vp case CIP_DAMAGERAIN: *vp = BOOLEAN_TO_JSVAL( gPriv->GetWeatherDamage( RAIN )); break; case CIP_DAMAGESNOW: *vp = BOOLEAN_TO_JSVAL( gPriv->GetWeatherDamage( SNOW )); break; case CIP_SPEED: *vp = INT_TO_JSVAL( gPriv->GetSpeed() ); break; + case CIP_HEALTHLEECH: *vp = INT_TO_JSVAL( gPriv->GetHealthLeech() ); break; + case CIP_STAMINALEECH: *vp = INT_TO_JSVAL( gPriv->GetStaminaLeech() ); break; + case CIP_MANALEECH: *vp = INT_TO_JSVAL( gPriv->GetManaLeech() ); break; case CIP_HITCHANCE: *vp = INT_TO_JSVAL( gPriv->GetHitChance() ); break; case CIP_DEFENSECHANCE: *vp = INT_TO_JSVAL( gPriv->GetDefenseChance() ); break; case CIP_HEALTHBONUS: *vp = INT_TO_JSVAL( gPriv->GetHealthBonus() ); break; @@ -1328,6 +1331,9 @@ JSBool CItemProps_setProperty( JSContext *cx, JSObject *obj, jsval id, jsval *vp case CIP_DAMAGERAIN: gPriv->SetWeatherDamage( RAIN, encaps.toBool() ); break; case CIP_DAMAGESNOW: gPriv->SetWeatherDamage( SNOW, encaps.toBool() ); break; case CIP_SPEED: gPriv->SetSpeed( static_cast( encaps.toInt() )); break; + case CIP_HEALTHLEECH: gPriv->SetHealthLeech( static_cast( encaps.toInt() )); break; + case CIP_STAMINALEECH: gPriv->SetStaminaLeech( static_cast( encaps.toInt() )); break; + case CIP_MANALEECH: gPriv->SetManaLeech( static_cast( encaps.toInt() )); break; case CIP_HITCHANCE: gPriv->SetHitChance( static_cast( encaps.toInt() )); break; case CIP_DEFENSECHANCE: gPriv->SetDefenseChance( static_cast( encaps.toInt() )); break; case CIP_HEALTHBONUS: gPriv->SetHealthBonus( static_cast( encaps.toInt() )); break; diff --git a/source/UOXJSPropertySpecs.h b/source/UOXJSPropertySpecs.h index 3217cf8e9..a8ecac965 100644 --- a/source/UOXJSPropertySpecs.h +++ b/source/UOXJSPropertySpecs.h @@ -538,6 +538,10 @@ inline JSPropertySpec CItemProps[] = { "ammoFXRender", CIP_AMMOFXRENDER, JSPROP_ENUMANDPERM, nullptr, nullptr }, { "speed", CIP_SPEED, JSPROP_ENUMANDPERM, nullptr, nullptr }, + { "healthLeech", CIP_HEALTHLEECH, JSPROP_ENUMANDPERM, nullptr, nullptr }, + { "staminaLeech", CIP_STAMINALEECH, JSPROP_ENUMANDPERM, nullptr, nullptr }, + { "manaLeech", CIP_MANALEECH, JSPROP_ENUMANDPERM, nullptr, nullptr }, + { "hitChance", CIP_HITCHANCE, JSPROP_ENUMANDPERM, nullptr, nullptr }, { "defenseChance", CIP_DEFENSECHANCE, JSPROP_ENUMANDPERM, nullptr, nullptr }, diff --git a/source/cBaseObject.cpp b/source/cBaseObject.cpp index b236df496..8ffa0e864 100644 --- a/source/cBaseObject.cpp +++ b/source/cBaseObject.cpp @@ -94,6 +94,9 @@ const SI16 DEFBASE_KILLS = 0; const UI16 DEFBASE_RESIST = 0; const bool DEFBASE_NAMEREQUESTACTIVE = 0; const ExpansionRuleset DEFBASE_ORIGIN = ER_UO; +const SI16 DEFBASE_HEALTHLEECH = 0; +const SI16 DEFBASE_STAMINALEECH = 0; +const SI16 DEFBASE_MANALEECH = 0; const SI16 DEFBASE_HITCHANCE = 0; const SI16 DEFBASE_DEFENSECHANCE = 0; @@ -118,7 +121,8 @@ mana( DEFBASE_MANA ), stamina( DEFBASE_STAMINA ), scriptTrig( DEFBASE_SCPTRIG ), in2( DEFBASE_INT2 ), FilePosition( DEFBASE_FP ), poisoned( DEFBASE_POISONED ), carve( DEFBASE_CARVE ), oldLocX( 0 ), oldLocY( 0 ), oldLocZ( 0 ), oldTargLocX( 0 ), oldTargLocY( 0 ), fame( DEFBASE_FAME ), karma( DEFBASE_KARMA ), kills( DEFBASE_KILLS ), subRegion( DEFBASE_SUBREGION ), nameRequestActive( DEFBASE_NAMEREQUESTACTIVE ), origin( DEFBASE_ORIGIN ), -healthBonus( DEFBASE_HEALTHBONUS ),staminaBonus( DEFBASE_STAMINABONOS ), manaBonus( DEFBASE_MANABONUS ), hitChance( DEFBASE_HITCHANCE ), defenseChance( DEFBASE_DEFENSECHANCE ) +healthBonus( DEFBASE_HEALTHBONUS ),staminaBonus( DEFBASE_STAMINABONOS ), manaBonus( DEFBASE_MANABONUS ), hitChance( DEFBASE_HITCHANCE ), defenseChance( DEFBASE_DEFENSECHANCE ), +healthLeech( DEFBASE_HEALTHLEECH ), staminaLeech( DEFBASE_STAMINALEECH ), manaLeech( DEFBASE_MANALEECH ) { multis = nullptr; tempMulti = INVALIDSERIAL; @@ -1680,6 +1684,25 @@ void CBaseObject::SetIntelligence2( SI16 nVal ) } //o------------------------------------------------------------------------------------------------o +//| Function - CBaseObject::GetHealthLeech() +//| CBaseObject::SetHealthLeech() +//o------------------------------------------------------------------------------------------------o +//| Purpose - Gets/Sets the Health Leech +//o------------------------------------------------------------------------------------------------o +SI16 CBaseObject::GetHealthLeech( void ) const +{ + return healthLeech; +} +void CBaseObject::SetHealthLeech( SI16 nVal ) +{ + healthLeech = nVal; + + if( CanBeObjType( OT_ITEM )) + { + ( static_cast( this ))->UpdateRegion(); + } +} + //| Function - CBaseObject::GetHealthBonus() //| CBaseObject::SetHealthBonus() //o------------------------------------------------------------------------------------------------o @@ -1701,6 +1724,25 @@ void CBaseObject::SetHealthBonus( SI16 nVal ) } //o------------------------------------------------------------------------------------------------o +//| Function - CBaseObject::GetStaminaLeech() +//| CBaseObject::SetStaminaLeech() +//o------------------------------------------------------------------------------------------------o +//| Purpose - Gets/Sets the Stamina Leech +//o------------------------------------------------------------------------------------------------o +SI16 CBaseObject::GetStaminaLeech( void ) const +{ + return staminaLeech; +} +void CBaseObject::SetStaminaLeech( SI16 nVal ) +{ + staminaLeech = nVal; + + if( CanBeObjType( OT_ITEM )) + { + ( static_cast( this ))->UpdateRegion(); + } +} + //| Function - CBaseObject::GetStaminaBonus() //| CBaseObject::SetStaminaBonus() //o------------------------------------------------------------------------------------------------o @@ -1722,6 +1764,25 @@ void CBaseObject::SetStaminaBonus( SI16 nVal ) } //o------------------------------------------------------------------------------------------------o +//| Function - CBaseObject::GetManaLeech() +//| CBaseObject::SetManaLeech() +//o------------------------------------------------------------------------------------------------o +//| Purpose - Gets/Sets the Mana Leech +//o------------------------------------------------------------------------------------------------o +SI16 CBaseObject::GetManaLeech( void ) const +{ + return manaLeech; +} +void CBaseObject::SetManaLeech( SI16 nVal ) +{ + manaLeech = nVal; + + if( CanBeObjType( OT_ITEM )) + { + ( static_cast( this ))->UpdateRegion(); + } +} + //| Function - CBaseObject::GetManaBonus() //| CBaseObject::SetManaBonus() //o------------------------------------------------------------------------------------------------o @@ -1773,6 +1834,35 @@ void CBaseObject::IncIntelligence( SI16 toInc ) } //o------------------------------------------------------------------------------------------------o +//| Function - CBaseObject::IncHealthLeech() +//o------------------------------------------------------------------------------------------------o +//| Purpose - Increments the object's Health Leech Points value +//o------------------------------------------------------------------------------------------------o +void CBaseObject::IncHealthLeech( SI16 toInc ) +{ + SetHealthLeech( healthLeech + toInc ); +} + +//o------------------------------------------------------------------------------------------------o +//| Function - CBaseObject::IncStaminaLeech() +//o------------------------------------------------------------------------------------------------o +//| Purpose - Increments the object's Stamina Leech Points value +//o------------------------------------------------------------------------------------------------o +void CBaseObject::IncStaminaLeech( SI16 toInc ) +{ + SetStaminaLeech( staminaLeech + toInc ); +} + +//o------------------------------------------------------------------------------------------------o +//| Function - CBaseObject::IncManaLeech() +//o------------------------------------------------------------------------------------------------o +//| Purpose - Increments the object's Mana Leech Points value +//o------------------------------------------------------------------------------------------------o +void CBaseObject::IncManaLeech( SI16 toInc ) +{ + SetManaLeech( manaLeech + toInc ); +} + //| Function - CBaseObject::IncHitChance() //o------------------------------------------------------------------------------------------------o //| Purpose - Increments the object's Hit Chance value diff --git a/source/cBaseObject.h b/source/cBaseObject.h index d014ce397..d19902995 100644 --- a/source/cBaseObject.h +++ b/source/cBaseObject.h @@ -77,6 +77,9 @@ class CBaseObject SI32 weight; SI16 mana; SI16 stamina; + SI16 healthLeech; + SI16 staminaLeech; + SI16 manaLeech; UI16 scriptTrig; SI16 st2; SI16 dx2; @@ -268,6 +271,19 @@ class CBaseObject void IncIntelligence( SI16 toInc = 1 ); + SI16 GetHealthLeech( void ) const; + virtual void SetHealthLeech( SI16 nVal ); + + SI16 GetStaminaLeech( void ) const; + virtual void SetStaminaLeech( SI16 nVal ); + + SI16 GetManaLeech( void ) const; + virtual void SetManaLeech( SI16 nVal ); + + void IncHealthLeech( SI16 toInc = 1 ); + void IncStaminaLeech( SI16 toInc = 1 ); + void IncManaLeech( SI16 toInc = 1 ); + void IncHitChance( SI16 toInc = 1 ); void IncDefenseChance( SI16 toInc = 1 ); @@ -280,7 +296,6 @@ class CBaseObject SI16 GetManaBonus( void ) const; virtual void SetManaBonus( SI16 nVal ); - virtual void PostLoadProcessing( void ); virtual bool LoadRemnants( void ) = 0; diff --git a/source/cChar.cpp b/source/cChar.cpp index 9e9f82727..acd8011f4 100644 --- a/source/cChar.cpp +++ b/source/cChar.cpp @@ -2922,7 +2922,11 @@ bool CChar::WearItem( CItem *toWear ) IncDexterity2( itemLayers[tLayer]->GetDexterity2() ); IncIntelligence2( itemLayers[tLayer]->GetIntelligence2() ); - IncHitChance( itemLayers[tLayer]->GetHitChance() ); + IncHealthLeech( itemLayers[tLayer]->GetHealthLeech() ); + IncStaminaLeech( itemLayers[tLayer]->GetStaminaLeech() ); + IncManaLeech( itemLayers[tLayer]->GetManaLeech() ); + + IncHitChance( itemLayers[tLayer]->GetHitChance() ); IncDefenseChance( itemLayers[tLayer]->GetDefenseChance() ); IncHealthBonus( itemLayers[tLayer]->GetHealthBonus() ); @@ -2989,6 +2993,10 @@ bool CChar::TakeOffItem( ItemLayers Layer ) IncDexterity2( -itemLayers[Layer]->GetDexterity2() ); IncIntelligence2( -itemLayers[Layer]->GetIntelligence2() ); + IncHealthLeech( -itemLayers[Layer]->GetHealthLeech() ); + IncStaminaLeech( -itemLayers[Layer]->GetStaminaLeech() ); + IncManaLeech( -itemLayers[Layer]->GetManaLeech() ); + IncHitChance( -itemLayers[Layer]->GetHitChance() ); IncDefenseChance( -itemLayers[Layer]->GetDefenseChance() ); diff --git a/source/cItem.cpp b/source/cItem.cpp index c994486c5..d692eaede 100644 --- a/source/cItem.cpp +++ b/source/cItem.cpp @@ -1665,6 +1665,9 @@ auto CItem::CopyData( CItem *target ) -> void target->SetStamina( GetStamina() ); target->SetStrength( GetStrength() ); target->SetStrength2( GetStrength2() ); + target->SetHealthLeech( GetHealthLeech() ); + target->SetStaminaLeech( GetStaminaLeech() ); + target->SetManaLeech( GetManaLeech() ); target->SetTitle( GetTitle() ); target->SetType( GetType() ); target->SetBuyValue( GetBuyValue() ); @@ -1767,6 +1770,7 @@ bool CItem::DumpBody( std::ostream &outStream ) const outStream << "ArtifactRarity=" + std::to_string( GetArtifactRarity() ) + newLine; outStream << "Movable=" + std::to_string( GetMovable() ) + newLine; outStream << "Priv=" + std::to_string( GetPriv() ) + newLine; + outStream << "LeechStats=" + std::to_string( GetHealthLeech() ) + "," + std::to_string( GetStaminaLeech() ) + "," + std::to_string( GetManaLeech() ) + newLine; outStream << "Value=" + std::to_string( GetBuyValue() ) + "," + std::to_string( GetSellValue() ) + "," + std::to_string( GetVendorPrice() ) + newLine; outStream << "Restock=" + std::to_string( GetRestock() ) + newLine; outStream << "AC=" + std::to_string( GetArmourClass() ) + newLine; @@ -1972,6 +1976,13 @@ bool CItem::HandleLine( std::string &UTag, std::string &data ) SetWeatherDamage( LIGHTNING, static_cast( std::stoul( oldstrutil::trim( oldstrutil::removeTrailing( data, "//" )), nullptr, 0 )) == 1 ); rValue = true; } + else if( UTag == "LEECHSTATS" ) + { + SetHealthLeech( static_cast( std::stoul( oldstrutil::trim( oldstrutil::removeTrailing( csecs[0], "//" )), nullptr, 0 ))); + SetStaminaLeech( static_cast( std::stoul( oldstrutil::trim( oldstrutil::removeTrailing( csecs[1], "//" )), nullptr, 0 ))); + SetManaLeech( static_cast( std::stoul( oldstrutil::trim( oldstrutil::removeTrailing( csecs[2], "//" )), nullptr, 0 ))); + rValue = true; + } break; case 'M': if( UTag == "MAXITEMS" ) diff --git a/source/items.cpp b/source/items.cpp index 04fa7e80d..9bb1e737e 100644 --- a/source/items.cpp +++ b/source/items.cpp @@ -139,6 +139,9 @@ auto ApplyItemSection( CItem *applyTo, CScriptSection *toApply, std::string sect } break; case DFNTAG_AC: applyTo->SetArmourClass( static_cast( ndata )); break; + case DFNTAG_HEALTHLEECH: applyTo->SetHealthLeech( static_cast( ndata )); break; + case DFNTAG_STAMINALEECH: applyTo->SetStaminaLeech( static_cast( ndata )); break; + case DFNTAG_MANALEECH: applyTo->SetManaLeech( static_cast( ndata )); break; case DFNTAG_BASERANGE: applyTo->SetBaseRange( static_cast( ndata )); break; case DFNTAG_HEALTHBONUS: applyTo->SetHealthBonus( static_cast( ndata )); break; case DFNTAG_STAMINABONUS: applyTo->SetStaminaBonus( static_cast( ndata )); break; diff --git a/source/ssection.cpp b/source/ssection.cpp index dcd593c59..2c1285d37 100644 --- a/source/ssection.cpp +++ b/source/ssection.cpp @@ -118,6 +118,7 @@ const UI08 dfnDataTypes[DFNTAG_COUNTOFTAGS] = DFN_NODATA, // DFNTAG_HIRELING, DFN_DOUBLENUMERIC, // DFNTAG_HP, DFN_DOUBLENUMERIC, // DFNTAG_HPMAX, + DFN_NUMERIC, // DFNTAG_HEALTHLEECH, DFN_UPPERSTRING, // DFNTAG_ID, DFN_DOUBLENUMERIC, // DFNTAG_IMBUING, DFN_NUMERIC, // DFNTAG_INTADD, @@ -143,6 +144,7 @@ const UI08 dfnDataTypes[DFNTAG_COUNTOFTAGS] = DFN_DOUBLENUMERIC, // DFNTAG_MAGICRESISTANCE, DFN_DOUBLENUMERIC, // DFNTAG_MANA, DFN_DOUBLENUMERIC, // DFNTAG_MANAMAX, + DFN_NUMERIC, // DFNTAG_MANALEECH, DFN_NUMERIC, // DFNTAG_MAXHP, DFN_NUMERIC, // DFNTAG_MAXITEMS, DFN_NUMERIC, // DFNTAG_MAXLOYALTY, @@ -228,6 +230,7 @@ const UI08 dfnDataTypes[DFNTAG_COUNTOFTAGS] = DFN_NUMERIC, // DFNTAG_SPLITCHANCE, DFN_DOUBLENUMERIC, // DFNTAG_STAMINA, DFN_DOUBLENUMERIC, // DFNTAG_STAMINAMAX, + DFN_NUMERIC, // DFNTAG_STAMINALEECH, DFN_DOUBLENUMERIC, // DFNTAG_STRENGTH, DFN_NUMERIC, // DFNTAG_STRADD, DFN_NUMERIC, // DFNTAG_STEALABLE, @@ -382,6 +385,7 @@ const std::map strToDFNTag {"HIRELING"s, DFNTAG_HIRELING}, {"HP"s, DFNTAG_HP}, {"HPMAX"s, DFNTAG_HPMAX}, + {"HEALTHLEECH"s, DFNTAG_HEALTHLEECH}, {"ID"s, DFNTAG_ID}, {"IMBUING"s, DFNTAG_IMBUING}, {"IN"s, DFNTAG_INTELLIGENCE}, @@ -411,6 +415,7 @@ const std::map strToDFNTag {"MAGICRESISTANCE"s, DFNTAG_MAGICRESISTANCE}, {"MANA"s, DFNTAG_MANA}, {"MANAMAX"s, DFNTAG_MANAMAX}, + {"MANALEECH"s, DFNTAG_MANALEECH}, {"MAXHP"s, DFNTAG_MAXHP}, {"MAXITEMS"s, DFNTAG_MAXITEMS}, {"MAXLOYALTY"s, DFNTAG_MAXLOYALTY}, @@ -495,6 +500,7 @@ const std::map strToDFNTag {"ST"s, DFNTAG_STRENGTH}, {"STAMINA"s, DFNTAG_STAMINA}, {"STAMINAMAX"s, DFNTAG_STAMINAMAX}, + {"STAMINALEECH"s, DFNTAG_STAMINALEECH}, {"STR"s, DFNTAG_STRENGTH}, {"STRENGTH"s, DFNTAG_STRENGTH}, {"ST2"s, DFNTAG_STRADD}, diff --git a/source/ssection.h b/source/ssection.h index 937a9af32..dc5ab2f45 100644 --- a/source/ssection.h +++ b/source/ssection.h @@ -125,6 +125,7 @@ enum DFNTAGS DFNTAG_HIRELING, DFNTAG_HP, DFNTAG_HPMAX, + DFNTAG_HEALTHLEECH, DFNTAG_ID, DFNTAG_IMBUING, DFNTAG_INTADD, @@ -150,6 +151,7 @@ enum DFNTAGS DFNTAG_MAGICRESISTANCE, DFNTAG_MANA, DFNTAG_MANAMAX, + DFNTAG_MANALEECH, DFNTAG_MAXHP, DFNTAG_MAXITEMS, DFNTAG_MAXLOYALTY, @@ -235,6 +237,7 @@ enum DFNTAGS DFNTAG_SPLITCHANCE, DFNTAG_STAMINA, DFNTAG_STAMINAMAX, + DFNTAG_STAMINALEECH, DFNTAG_STRENGTH, DFNTAG_STRADD, DFNTAG_STEALABLE,