Code:
<Object type="0x0932" id="Oryx the Mad God 2">
<DisplayId>Oryx the Mad God</DisplayId>
<Enemy/>
<Class>Character</Class>
<Texture>
<File>lofiChar16x16</File>
<Index>0x54</Index>
</Texture>
<HitSound>monster/oryx_hit</HitSound>
<DeathSound>monster/oryx_death</DeathSound>
<Size>120</Size>
<MaxHitPoints>75000</MaxHitPoints>
<Defense>60</Defense>
<Quest/>
<God/>
<Oryx/>
<StasisImmune/>
<Level>1</Level>
<XpMult>1</XpMult>
<NoArticle/>
<Projectile id="0">
<ObjectId>Fire Bolt</ObjectId>
<Damage>135</Damage>
<Speed>70</Speed>
<LifetimeMS>2500</LifetimeMS>
</Projectile>
<Projectile id="1">
<ObjectId>Green Star</ObjectId>
<Damage>160</Damage>
<Speed>70</Speed>
<LifetimeMS>2500</LifetimeMS>
<ConditionEffect duration="10">Slowed</ConditionEffect>
</Projectile>
<Projectile id="2">
<ObjectId>Blade</ObjectId>
<Damage>240</Damage>
<Speed>100</Speed>
<LifetimeMS>450</LifetimeMS>
</Projectile>
<Projectile id="3">
<ObjectId>Purple Star</ObjectId>
<Damage>160</Damage>
<Speed>55</Speed>
<LifetimeMS>3000</LifetimeMS>
<ConditionEffect duration="5">Blind</ConditionEffect>
</Projectile>
<Projectile id="4">
<ObjectId>Blue Star</ObjectId>
<Damage>160</Damage>
<Speed>105</Speed>
<LifetimeMS>1200</LifetimeMS>
<ConditionEffect duration="5">Confused</ConditionEffect>
</Projectile>
<Projectile id="5">
<ObjectId>Grey Star</ObjectId>
<Damage>160</Damage>
<Speed>45</Speed>
<LifetimeMS>3000</LifetimeMS>
<ConditionEffect duration="3">Quiet</ConditionEffect>
</Projectile>
<Projectile id="6">
<ObjectId>Red Star</ObjectId>
<Damage>160</Damage>
<Speed>55</Speed>
<LifetimeMS>3000</LifetimeMS>
<ArmorPiercing/>
</Projectile>
<Projectile id="13">
<ObjectId>Dark Gray Spinner</ObjectId>
<Speed>90</Speed>
<Size>100</Size>
<Damage>1</Damage>
<LifetimeMS>1800</LifetimeMS>
<ConditionEffect duration="20">Quiet</ConditionEffect>
<MultiHit/>
</Projectile>
<Projectile id="14">
<ObjectId>Gray Spinner</ObjectId>
<Speed>90</Speed>
<Size>100</Size>
<Damage>1</Damage>
<LifetimeMS>1800</LifetimeMS>
<ConditionEffect duration="60">Weak</ConditionEffect>
<MultiHit/>
</Projectile>
</Object>
I assume you know how the XML works, it should be fairly self-explanatory, much like behaviors themselves. If you need a reference, examine the XML code of "Oryx the Mad God 2". You use that ID in the C# code - when you create a behavior, you have to remember a few key things. 1: Make sure that you copy the 3 using statements located in all the other behavior files. Don't worry about regions, they're simply meant for organization purposes.
Code:
new State(
new DropPortalOnDeath("Deadwater Docks", 100),
new State("Idle",
new Taunt(0.1, "Break the crystal for great rewards..."),
new Taunt(0.1, "Help me..."),
new HpLessTransition(0.9999, "Instructions"),
new TimedTransition(10000, "Idle")
),
new State("Instructions",
new Flash(0xffffffff, 2, 100),
new Taunt(0.8, "Fire upon this crystal with all your might for 5 seconds"),
new Taunt(0.8, "If your attacks are weak, the crystal magically heals"),
new Taunt(0.8, "Gather a large group to smash it open"),
new HpLessTransition(0.998, "Evaluation")
),
And HpLessTransition as seen above refers to how much hp is needed to be depleted for it to continue to the next state. Remember that 1 = 100% HP. Thus, 0.998 = 99.8%!
Code:
new State("Daisy_attack",
new Prioritize(
new StayCloseToSpawn(0.3, 7),
new Wander(0.3)
),
Hopefully, you're getting the hang of this. You should be able to see what's going on here; the enemy will move, but stay close to it's spawn point.
Code:
new ConditionalEffect(ConditionEffectIndex.Invulnerable),
new Shoot(0, projectileIndex: 0, count: 4, shootAngle: 90, fixedAngle: 0, coolDown: 300),
Lastly is it's conditional effects and shots. The conditional effect can be changed to whatever you want, such as berserk, statsis, or armored. The new shoot looks a little complicated - but it's quite simple in usage. The projectileindex is simply a reference to the id of the shots you set in your XML! Make sure you don't go out of bounds, otherwise you'll get a bunch of errors in wServer.exe! It's zerobased - so it's common practice to start at 0, though you can theoretically use any number you like.