Page 1 of 1

[Elemental System]

Posted: Sat Jun 20, 2009 8:16 am
by Mage
Hi,

I updeted the Server to last revision, and i did this two update:

http://www.l2jdp.com/trac/changeset/6274
http://l2jserver.com/trac/changeset/3178

Now the resist don't work.

I hit a player with 0 resist in wind with hurricane and i hit 1000.
Ihit a player with 150 resist in wind with hurricane and i hit 1000.

Is it normal?

Re: [Elemental System]

Posted: Sat Jun 20, 2009 8:46 am
by _DS_
Yes, for skills damage can't be lower than base (without attributes).

Re: [Elemental System]

Posted: Sat Jun 20, 2009 9:36 am
by Mage
Now mage crit 3k.


I have a PvP Server with enchante at +20 and full buff, and Mage 3 shot the Fighter...

However thx DS to the asnwer :)

Re: [Elemental System]

Posted: Sat Jun 20, 2009 11:26 am
by Mage
Is it possible to have the patch to have the resist as the first time? First of the update.

Where:

Hurricane on player with resist 0 = 1000 dameage

Hurricane on player with resist 150 = 300 dameage (for example)

Thank =)

Re: [Elemental System]

Posted: Wed Jul 01, 2009 3:56 pm
by Mage
Up
Is it possible to have the patch to have the resist as the first time? First of the update.

Where:

Hurricane on player with resist 0 = 1000 dameage

Hurricane on player with resist 150 = 300 dameage (for example)

Thank =)

Re: [Elemental System]

Posted: Wed Jul 01, 2009 4:33 pm
by _DS_
In Formulas.calcElemental

calcTotal = calcPower - calcDefen;
if (calcTotal > 0)

Replace >0 to smth like >-50.

Re: [Elemental System]

Posted: Wed Jul 01, 2009 4:51 pm
by Mage
_DS_ wrote:In Formulas.calcElemental

calcTotal = calcPower - calcDefen;
if (calcTotal > 0)

Replace >0 to smth like >-50.
Very thx ;)

Re: [Elemental System]

Posted: Wed Jul 01, 2009 5:54 pm
by Mage
_DS_ I tried on Live, it works but...

An Example

With resist wind 0 ---> 1k dameage true

With resist 55 ---> 800 dameage true

With resist 75 ---> 800 dameage true

With resist 135 ---> 950 dameage error?

Is there an error?

Re: [Elemental System]

Posted: Wed Jul 01, 2009 6:10 pm
by Mage
Ok, i try the problem, i solved...

I Found this patch of Cap:

Code: Select all

Index: java/net/sf/l2j/Config.java===================================================================--- java/net/sf/l2j/Config.java (revision 2745)+++ java/net/sf/l2j/Config.java (working copy)@@ -128,6 +128,7 @@     public static boolean  ALT_GAME_SUBCLASS_WITHOUT_QUESTS;     public static int      MAX_RUN_SPEED;     public static int      MAX_PCRIT_RATE;+    public static int      MAX_STAT;     public static int      MAX_MCRIT_RATE;     public static int      MAX_PATK_SPEED;     public static int      MAX_MATK_SPEED;@@ -587,6 +588,7 @@     public static int      FENRIR_SPEED;     public static int      GREAT_SNOW_WOLF_SPEED;     public static int      SNOW_FENRIR_SPEED;     public static double   RAID_HP_REGEN_MULTIPLIER;     public static double   RAID_MP_REGEN_MULTIPLIER;     public static double   RAID_PDEFENCE_MULTIPLIER;@@ -1282,6 +1284,7 @@                    ALT_GAME_SUBCLASS_WITHOUT_QUESTS    = Boolean.parseBoolean(Character.getProperty("AltSubClassWithoutQuests", "False"));                    MAX_RUN_SPEED                       = Integer.parseInt(Character.getProperty("MaxRunSpeed", "250"));                    MAX_PCRIT_RATE                      = Integer.parseInt(Character.getProperty("MaxPCritRate", "500"));+                   MAX_STAT                            = Integer.parseInt(Character.getProperty("MaxStat", "40"));                    MAX_MCRIT_RATE                      = Integer.parseInt(Character.getProperty("MaxMCritRate", "200"));                    MAX_PATK_SPEED                      = Integer.parseInt(Character.getProperty("MaxPAtkSpeed", "1500"));                    MAX_MATK_SPEED                      = Integer.parseInt(Character.getProperty("MaxMAtkSpeed", "1999"));@@ -1670,9 +1673,10 @@                                                            }                    WYVERN_SPEED                            = Integer.parseInt(NPC.getProperty("WyvernSpeed", "100"));                    STRIDER_SPEED                           = Integer.parseInt(NPC.getProperty("StriderSpeed", "80"));                    FENRIR_SPEED                        = Integer.parseInt(NPC.getProperty("FenrirSpeed", "80"));                        SNOW_FENRIR_SPEED                       = Integer.parseInt(NPC.getProperty("SnowFenrirSpeed", "80"));                    GREAT_SNOW_WOLF_SPEED                       = Integer.parseInt(NPC.getProperty("GreatSnowWolfSpeed", "80"));                        RAID_HP_REGEN_MULTIPLIER                = Double.parseDouble(NPC.getProperty("RaidHpRegenMultiplier", "100")) /100;                    RAID_MP_REGEN_MULTIPLIER                = Double.parseDouble(NPC.getProperty("RaidMpRegenMultiplier", "100")) /100;                    RAID_PDEFENCE_MULTIPLIER                = Double.parseDouble(NPC.getProperty("RaidPDefenceMultiplier", "100")) /100;      Index: java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java===================================================================--- java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java   (revision 2745)+++ java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java   (working copy)@@ -123,6 +123,7 @@                    env.value = 1;            }                   }+                   return env.value;    }@@ -704,43 +705,87 @@        return (int) calcStat(Stats.MP_CONSUME, skill.getMpInitialConsume(), null, skill);    } -    public double getElementAttributeFire()+    public int getAttackElement()     {-        return (int) (100 - 100 * calcStat(Stats.FIRE_VULN, _activeChar.getTemplate().baseFireVuln, null, null));+        return -2;     } -    public double getElementAttributeWater()+    public double getAttackElementValue()     {-        return (int) (100 - 100 * calcStat(Stats.WATER_VULN, _activeChar.getTemplate().baseWaterVuln, null, null));+        return 0.0;     } -    public double getElementAttributeEarth()-    {-        return (int) (100 - 100 * calcStat(Stats.EARTH_VULN, _activeChar.getTemplate().baseEarthVuln, null, null));-    }+   /** Return the Elemental Attribute Cap For Fire */+    public double getElementAttributeFire()+   {+       if (_activeChar == null)+           return 1; -    public double getElementAttributeWind()-    {-        return (int) (100 - 100 * calcStat(Stats.WIND_VULN, _activeChar.getTemplate().baseWindVuln, null, null));-    }+       int val = (int) (100 - 100 * calcStat(Stats.FIRE_VULN, _activeChar.getTemplate().baseFireVuln, null, null));+       if (val > Config.MAX_STAT && !_activeChar.isGM())+           val = Config.MAX_STAT;+       return val;+   } -    public double getElementAttributeHoly()-    {-        return (int) (100 - 100 * calcStat(Stats.HOLY_VULN, _activeChar.getTemplate().baseHolyVuln, null, null));-    } -    public double getElementAttributeUnholy()-    {-        return (int) (100 - 100 * calcStat(Stats.DARK_VULN, _activeChar.getTemplate().baseDarkVuln, null, null));-    }+   /** Return the Elemental Attribute Cap For Water */+   public double getElementAttributeWater()+   {+       if (_activeChar == null)+           return 1; -    public int getAttackElement()-    {-        return -2;-    }+       int val = (int) (100 - 100 * calcStat(Stats.WATER_VULN, _activeChar.getTemplate().baseWaterVuln, null, null));+       if (val > Config.MAX_STAT && !_activeChar.isGM())+           val = Config.MAX_STAT;+       return val;+   } -    public double getAttackElementValue()-    {-        return 0.0;-    }++        /** Return the Elemental Attribute Cap For Earth */+   public double getElementAttributeEarth()+   {+       if (_activeChar == null)+           return 1;++       int val = (int) (100 - 100 * calcStat(Stats.EARTH_VULN, _activeChar.getTemplate().baseEarthVuln, null, null));+       if (val > Config.MAX_STAT && !_activeChar.isGM())+           val = Config.MAX_STAT;+       return val;+   }++   /** Return the Elemental Attribute Cap For Wind */+   public double getElementAttributeWind()+   {+       if (_activeChar == null)+           return 1;++       int val = (int) (100 - 100 * calcStat(Stats.WIND_VULN, _activeChar.getTemplate().baseWindVuln, null, null));+       if (val > Config.MAX_STAT && !_activeChar.isGM())+           val = Config.MAX_STAT;+       return val;+   }++   /** Return the Elemental Attribute Cap For Holy */+   public double getElementAttributeHoly()+   {+       if (_activeChar == null)+           return 1;++       int val = (int) (100 - 100 * calcStat(Stats.HOLY_VULN, _activeChar.getTemplate().baseHolyVuln, null, null));+       if (val > Config.MAX_STAT && !_activeChar.isGM())+           val = Config.MAX_STAT;+       return val;+   }++   /** Return the Elemental Attribute Cap For UnHoly */+   public double getElementAttributeUnholy()+   {+       if (_activeChar == null)+           return 1;++       int val = (int) (100 - 100 * calcStat(Stats.DARK_VULN, _activeChar.getTemplate().baseDarkVuln, null, null));+       if (val > Config.MAX_STAT && !_activeChar.isGM())+           val = Config.MAX_STAT;+       return val;+   } } 
But is old and now doesn't work...

Is there a good soul that can update its? :)

Thankz boys

Re: [Elemental System]

Posted: Wed Jul 01, 2009 6:14 pm
by _DS_
Why you asking me ? Element bonus not applied if attack-def lower than -50 (in the sample).