NPC loading and saving!
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / creature / npc / Gargoyle.as
blob732ca7d2da290a9d9bdb797630cfa0323e3f0631
1 package org.sevenchan.dongs.creature.npc
3 import org.sevenchan.dongs.bodyparts.Breast;
4 import org.sevenchan.dongs.Creature;
5 import org.sevenchan.dongs.screens.encounters.GargoyleEncounter;
6 import flash.net.*;
8 /**
9 * ...
10 * @author Harbinger
12 public class Gargoyle extends NPC
14 registerClassAlias("_NPC_Gargoyle", Gargoyle);
15 public var confidence:int = 0;
16 public function Gargoyle()
18 super("Gargoyle");
19 // Defer setup until onNewNPC, since it's stored in saves.
21 override public function getTypeName():String
23 return "Gargoyle";
25 override public function onNewNPC():void
27 trace("Gargoyle.onNewNPC()!");
28 ownName = "The Gargoyle";
31 override public function onLoad(npc:NPC):void
33 trace("Gargoyle.onLoaded()!", npc);
34 if (npc!=null)
36 confidence = (npc as Gargoyle).confidence;
39 override public function onEncounter(ply:Creature):Boolean
41 GargoyleEncounter.push(this);
42 return true;
44 override public function getHostile(subj:Creature):Boolean
46 return false;
49 override public function addBreast():Breast
51 var boob:Breast = BodyPartRegistry.demon_breast;
52 boob.size = 6;
53 breasts.push(boob);
54 return boob;