ID:140419
 
Code:
var
list/VerbObjectLists = list("Bunshin" = list(), "Phoenix Fire" = /verb_object/PhoenixFire, "Flurry Phoenix" = /verb_object/FlurryPheonix, "Grand Fireball" = /verb_object/GrandFireball, "Dragon Flame" = /verb_object/DragonFlame, "Pressure Damage" = /verb_object/PressureDamage, "Renkudan" = /verb_object/Renkudan, "Great Breakthrough" = /verb_object/GreatBreakthrough, "Grand Waterfall" = /verb_object/GrandWaterfall, "Water Dragon" = /verb_object/WaterDragon, "Water Prison" = /verb_object/WaterPrison, "Water Fang Projectile" = /verb_object/WaterFangProjectile, "Earth Spear" = /verb_object/EarthSpear, "Earth Dome Prison" = /verb_object/EarthPrison, "Doryuudan" = /verb_object/Doryuudan, "Mudslide Barrier" = /verb_object/MudslideBarrier, "Rasengan" = /verb_object/MudslideBarrier, "Shuriken Rasengan" = /verb_object/ShRasengan, "Spark Nagashi" = /verb_object/SparkNagashi, "Nagashi" = /verb_object/Nagashi, "Chidori Blade" = /verb_object/ChidoriBlade, "Chidori" = /verb_object/Chidori, "Chidori Senbon" = /verb_object/ChidoriSenbon)
list/MasteryVar = list("Bunshin" = "Bunshin", "Phoenix Fire" = "Phoenix Fire", "Flurry Phoenix" = "Flurry Phoenix", "Grand Fireball" = "Grand Fireball", "Dragon Flame" = "Dragon Flame", "Pressure Damage" = "Pressure Damage", "Renkudan" = "Renkudan", "Great Breakthrough" = "Great Breakthrough", "Grand Waterfall" = "Grand Waterfall", "Water Dragon" = "Water Dragon", "Water Prison" = "Water Prison", "Water Fang Projectile" = "Water Fang Projectile", "Earth Spear" = "Earth Spear", "Earth Dome Prison" = "Earth Dome Prison", "Doryuudan" = "Doryuudan", "Mudslide Barrier" = "Mudslide Barrier", "Rasengan" = "Rasengan", "Shuriken Rasengan" = "Shuriken Rasengan", "Spark Nagashi" = "Spark Nagashi", "Nagashi" = "Nagashi", "Chidori Blade" = "Chidori Blade", "Chidori" = "Chidori", "Chidori Senbon" = "Chidori Senbon" )

VerbObjectAssemble()
src << "Verb Object Assembled"
src.PermVars["VerbObjectList"] = null
src.PermVars["VerbObjectList"] = list()
src.PermVars["VerbObjectList"] += new/verb_object/Rest
for(var/v in MasteryVar)
if(v in src.JutsuKnown)
src.PermVars["VerbObjectList"] += new VerbObjectLists[v]


Problem description:
Basically, it wont add them to the VerbObjectList. I did tests, and it's in JutsuKnown, and returns the proper type of VerbObject. It just wont add?
Whenever you're doing something in that manner, where you have to duplicate or write a lot of code in a repetitive manner (like in your 2 monster lists over there), it's a sign you're going about doing something in a very wrong way. I strongly recommend designing this in a more sensible, intuitive and manageable manner. It will make life easier for you once it's done.

For that matter, even these 3 lines:

Asellia wrote:
>           src.PermVars["VerbObjectList"] = null
> src.PermVars["VerbObjectList"] = list()
> src.PermVars["VerbObjectList"] += new/verb_object/Rest

Are all equivalent to this one line:
            src.PermVars["VerbObjectList"] = list(new /verb_object/Rest)

When you use the = operator, you overwrite whatever old value there was in the variable on the left-hand side with the value of the right-hand side. There is no reason or point in overwriting a var with null to "empty" it before overwriting it with another value.

Basically, it wont add them to the VerbObjectList. I did tests, and it's in JutsuKnown, and returns the proper type of VerbObject. It just wont add?

It seems it should work just fine provided there's nothing going awry in your list accessing, or the created object's New(). Use debug code to see where the code execution gets to as well as the value of VerbObjectLists[v] and whether it ends up containing a type path. If so, and the newly-created object isn't being added to the list which is the association of the key "VerbObjectList" in the associative list src.PermVars, then review the object's New() to make sure it doesn't delete itself or do any Bad Things. Lastly, you could check if the list ends up being affected at all by that addition line; see if a different element is being added to the list, like null.