AOE Chronosphere

This commit is contained in:
Paul Chote
2010-11-23 16:36:20 +13:00
parent 41665f7e95
commit 3d1d4a1aff
7 changed files with 164 additions and 115 deletions

View File

@@ -39,8 +39,16 @@ namespace OpenRA.Mods.RA
self.QueueActivity(new Teleport(chronoshiftOrigin));
}
}
public virtual bool CanChronoshiftTo(Actor self, int2 targetLocation)
{
// Todo: Allow enemy units to be chronoshifted into bad terrain to kill them
return self.HasTrait<ITeleportable>() &&
self.Trait<ITeleportable>().CanEnterCell(targetLocation) &&
self.World.LocalPlayer.Shroud.IsExplored(targetLocation);
}
public virtual bool Activate(Actor self, int2 targetLocation, int duration, bool killCargo, Actor chronosphere)
public virtual bool Teleport(Actor self, int2 targetLocation, int duration, bool killCargo, Actor chronosphere)
{
/// Set up return-to-sender info
chronoshiftOrigin = self.Location;