UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[SVN] Morphed forms

Status
Not open for further replies.

Enlightener

Sorceror
[SVN] Morphed forms

Publish 56 - (misc)

Morphed forms will now check for the correct skill and skill amount

  • Banking skill in a Soulstone will check your resultant skill level, and return you to normal if you can no longer maintain your morphed form
  • Casting from a scroll will return you to normal in three minutes


In english: for example.- if you have 99 necro and cast vampiric embrace (no problem), if you have 66.1 in magery and cast polymorph (no problem) etc...

the problem comes when you remove items that gives you skill, meaning that if you have, for example, 49 in necro and 50 from items, cast vampiric embrace and remove the items, the embrace is dispeled.

This is true for necromancy, magery, ninjutsu and spellweaving.



Skill Jewelry and Form-Changing Spells in Publish 56
I didn't have a version of the question handy, but this has come up a number of times. Currently, if you use skill jewelry to increase your skill, cast a form-changing spell (such as Necromancy's Vampiric Embrace) then remove the skill jewelry, you remain in that form.

This will be changing in Publish 56. What will happen is if you lower your skill past the threshhold to be able to cast that particular form-changing spell, (whether by removing items, using a soulstone, or even using the Test Center set skill command) you will revert to your normal form. This will affect not only the various forms available with Necromancy but Magery (Polymorph,) Ninjitsu (Animal Form,) and Spellweaving (Reaper Form.)


Links:
http://www.uoguide.com/Publish_56
http://www.uoherald.com/fof/index.php?fofId=128

PS: i dont know why nobody remembered this particular fix
 

Buiu

Knight
Re: Morphed forms

hmm any staff can tell us if this ll be implemented ?
cuz if yes i need to change the templates hehe :D
 

Gisela

Bug Hunter
Re: [CODER NEEDED] Morphed forms

Round 1 : on removal of AOS skill items

This should happen in Mobile.cs, where it would look a LOT nicer, but everyone hates a core mod.

Not addressed : soulstones, scrolls, mage weapons (should they knock you out of polymorph?)

Lightly tested

e: this needs a little more work. Will update soon.
 

Gisela

Bug Hunter
Re: [TESTING] Morphed forms

Better -

Adds a new method, AosSkillBonuses.CheckCancelMorph() that can be re-used when we need to check this for soulstones, normal skill loss, admin [setskill commands, etc.

The path is still fraught with danger but I feel a lot better about this version :)

Code:
Index: Scripts/Misc/AOS.cs
===================================================================
--- Scripts/Misc/AOS.cs    (revision 369)
+++ Scripts/Misc/AOS.cs    (working copy)
@@ -3,8 +3,13 @@
 using System.Collections.Generic;
 using Server;
 using Server.Items;
+using Server.Misc;
 using Server.Mobiles;
 using Server.Network;
+using Server.Spells;
+using Server.Spells.Fifth;
+using Server.Spells.Seventh;
+using Server.Spells.Ninjitsu;
 
 namespace Server
 {
@@ -644,9 +649,14 @@
             if( m_Mods == null )
                 return;
 
-            for( int i = 0; i < m_Mods.Count; ++i )
+            for( int i = 0; i < m_Mods.Count; ++i ) {
+
+                Mobile m = m_Mods[i].Owner;
                 m_Mods[i].Remove();
 
+                if ( Core.ML )
+                    CheckCancelMorph ( m );
+            }
             m_Mods = null;
         }
 
@@ -728,6 +738,53 @@
             return "...";
         }
 
+        public void CheckCancelMorph ( Mobile m )
+        {
+            if ( m == null )
+                return;
+
+            double minSkill, maxSkill;
+
+            AnimalFormContext acontext = AnimalForm.GetContext( m );
+            TransformContext context = TransformationSpellHelper.GetContext( m );
+
+            if ( context != null ) {
+                Spell spell = context.Spell as Spell;
+                spell.GetCastSkills ( out minSkill, out maxSkill );
+                if ( m.Skills[spell.CastSkill].Value < minSkill )
+                    TransformationSpellHelper.RemoveContext( m, context, true );
+            }
+            if ( acontext != null ) {
+                int i;
+                for ( i = 0; i < AnimalForm.Entries.Length; ++i )
+                    if ( AnimalForm.Entries[i].Type == acontext.Type )
+                        break;
+                if ( m.Skills[SkillName.Ninjitsu].Value < AnimalForm.Entries[i].ReqSkill )
+                    AnimalForm.RemoveContext( m, true );
+            }
+            if ( !m.CanBeginAction ( typeof ( PolymorphSpell ) ) && m.Skills[SkillName.Magery].Value < 66.1 ) {
+                m.BodyMod = 0;
+                m.HueMod = -1;
+                m.NameMod = null;
+                m.EndAction( typeof( PolymorphSpell ) );
+                BaseArmor.ValidateMobile( m );
+                BaseClothing.ValidateMobile( m );
+            }
+            if ( !m.CanBeginAction ( typeof ( IncognitoSpell ) ) && m.Skills[SkillName.Magery].Value < 38.1 ) {
+                if ( m is PlayerMobile )
+                    ((PlayerMobile)m).SetHairMods( -1, -1 );
+                m.BodyMod = 0;
+                m.HueMod = -1;
+                m.NameMod = null;
+                m.EndAction( typeof( IncognitoSpell ) );
+                BaseArmor.ValidateMobile( m );
+                BaseClothing.ValidateMobile( m );
+                BuffInfo.RemoveBuff( m, BuffIcon.Incognito );
+            }
+            return;
+        }
+
+
         [CommandProperty( AccessLevel.GameMaster )]
         public double Skill_1_Value { get { return GetBonus( 0 ); } set { SetBonus( 0, value ); } }
 
@@ -1019,4 +1076,4 @@
             return index;
         }
     }
-}
\ No newline at end of file
+}[FONT=verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif]
[/font]
 

Attachments

  • morphs.diff
    2.6 KB · Views: 16

Gisela

Bug Hunter
Re: [TESTING] Morphed forms

Thanks :)

I think the function should be moved to spellhelper, but that can wait till it's tested.

One more thing I need to know is whether normal skill loss will knock you out of a morph. If not, working around the jewel restrictions is pretty easy ( set meditation down, buy skill from npc, cast morph, raise med again == free wraith for an elf )
 
Re: [TESTING-TC] Morphed forms

My tests in DemiseTC:

- I set my necromancy skill to 90 and equipped Midnight Bracers, then casted Vampiric Embrace. Then, I removed bracers. I return instantly to the original form, without a warning message or a sound or an effect.

- With same method, scaling necro skills, I tried Lich Form, Wraith Form and Horrific Beast. I got the same result.

- For magery I tried Polymorph and equipped a Tome. I got same result.

- For spellweaving I haven't tried since I don't know items that gives a bonus to Spellweaving.

If the way you return normal is like OSI, it's ok for me.
 

Athena

Account Terminated
Re: [TESTING-TC] Morphed forms

Yup that is the way it works on OSI, starting the 5 day timer.
 

psz

Administrator
Re: [READY] Morphed forms

Does this check for ML?
Since it's a Pub 56 change, it shouldn't affect Pre-Pub 56.
 
Re: [READY] Morphed forms

psz;639754 said:
Does this check for ML?
Since it's a Pub 56 change, it shouldn't affect Pre-Pub 56.

it should be, as there is in the code:
Code:
 +                if ( Core.ML )
+                    CheckCancelMorph ( m );

A test in a ML and pre-ML environment wouldn't be bad, though.
 
Re: [READY] Morphed forms

osd_daedalus;639926 said:
[/code]A test in a ML and pre-ML environment wouldn't be bad, though.

did it:

it affects ML shards
it won't affect SE and earlier shards

so it's perfectly OK.

This is the patch updated for SVN 427 (the previous one was for 369).
I think it can be moved as Ready.
 

Attachments

  • morphs.diff
    2.5 KB · Views: 2
Status
Not open for further replies.
Top