Esempio n. 1
0
        public static bool AddAttackPlane(this Critter npc, uint priority, Critter target, bool run)
        {
            NpcPlane plane = Global.CreatePlane();

            plane.Type            = PlaneType.Attack;
            plane.Priority        = (priority == 0?Priorities.Attack:priority);
            plane.Attack_TargId   = target.Id;
            plane.Attack_MinHp    = Global.DeadHitPoints;
            plane.Attack_IsGag    = false;
            plane.Attack_GagHexX  = 0;
            plane.Attack_GagHexY  = 0;
            plane.Attack_LastHexX = target.HexX;
            plane.Attack_LastHexY = target.HexY;
            plane.Run             = run;
            return(npc.AddPlane(plane));
        }
Esempio n. 2
0
        public static bool AddWalkPlane(this Critter npc, uint priority, ushort hexX, ushort hexY, Direction dir, bool run, uint cut)
        {
            if (!npc.IsCanWalk)
            {
                return(false);
            }

            NpcPlane plane = Global.CreatePlane();

            plane.Type      = PlaneType.Walk;
            plane.Priority  = (priority == 0?Priorities.Walk:priority);
            plane.Walk_HexX = hexX;
            plane.Walk_HexY = hexY;
            plane.Walk_Dir  = dir;
            plane.Run       = run;
            plane.Walk_Cut  = cut;
            return(npc.AddPlane(plane));
        }
Esempio n. 3
0
        public static bool AddAttackPlane(this Critter npc, uint priority, uint critId)
        {
            Critter target = Global.GetCritter(critId);

            if (target == null)
            {
                Global.Log("Target not found.");
                return(false);
            }

            NpcPlane plane = Global.CreatePlane();

            plane.Type            = PlaneType.Attack;
            plane.Priority        = (priority == 0?Priorities.Attack:priority);
            plane.Attack_TargId   = target.Id;
            plane.Attack_MinHp    = Global.DeadHitPoints;
            plane.Attack_IsGag    = false;
            plane.Attack_GagHexX  = 0;
            plane.Attack_GagHexY  = 0;
            plane.Attack_LastHexX = target.HexX;
            plane.Attack_LastHexY = target.HexY;
            plane.Run             = false;
            return(npc.AddPlane(plane));
        }
Esempio n. 4
0
 public virtual NpcPlane SetChild(NpcPlane child)
 {
     return new NpcPlane(NpcPlane_SetChild(thisptr, child.thisptr));
 }
 public virtual NpcPlane SetChild(NpcPlane child)
 {
     return(new NpcPlane(NpcPlane_SetChild(thisptr, child.thisptr)));
 }
Esempio n. 6
0
 public CritterEventPlaneRunArgs(Critter cr, NpcPlane plane, int reason, uint p0, uint p1, uint p2)
     : base(cr)
 {
     this.Plane = plane;
     this.Reason = reason;
     this.Param0 = p0;
     this.Param1 = p1;
     this.Param2 = p2;
 }
Esempio n. 7
0
 public CritterEventPlaneBeginEndArgs(Critter cr, NpcPlane plane, int reason, Critter some_cr, Item some_item)
     : base(cr)
 {
     this.Plane = plane;
     this.Reason = reason;
     this.SomeCr = some_cr;
     this.SomeItem = some_item;
 }
 public virtual bool AddPlane(NpcPlane plane)
 {
     return Npc_AddPlane(thisptr, plane.ThisPtr);
 }