Elin Decompiled Documentation EA 23.189 Nightly
Loading...
Searching...
No Matches
TraitCoreDefense.cs
Go to the documentation of this file.
1public class TraitCoreDefense : Trait
2{
3 public override bool CanBeDestroyed => false;
4
5 public override bool CanOnlyCarry => true;
6
7 public override bool CanPutAway => false;
8
9 public override bool IsLightOn => true;
10
11 public override void TrySetAct(ActPlan p)
12 {
14 {
16 {
17 p.TrySetAct("actWarhorn", delegate
18 {
19 SE.Play("warhorn");
20 Msg.Say("warhorn");
22 return true;
23 });
24 }
26 {
27 p.TrySetAct("actWarhornRaid", delegate
28 {
29 SE.Play("warhorn");
30 Msg.Say("warhorn");
32 return true;
33 });
34 }
36 {
37 p.TrySetAct("50", delegate
38 {
39 SE.Play("warhorn");
40 Msg.Say("warhorn");
41 EClass.game.survival.flags.raidLv += 50;
42 return true;
43 });
44 }
45 }
47 if (ev == null)
48 {
49 return;
50 }
51 if (ev.wave % 5 != 0 && !ev.retreated)
52 {
53 p.TrySetAct("actWarhorn", delegate
54 {
55 ev.Horn_Next();
56 return true;
57 });
58 }
59 if (ev.CanRetreat && EClass.player.returnInfo == null)
60 {
61 p.TrySetAct("actEvacDefense", delegate
62 {
63 ev.Horn_Retreat();
64 return true;
65 });
66 }
67 if (ev.CanCallAlly)
68 {
69 p.TrySetAct("actCallAlly", delegate
70 {
71 ev.Horn_Ally();
72 return true;
73 });
74 }
75 }
76}
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
Definition: ActPlan.cs:366
bool enable
Definition: CoreDebug.cs:286
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static Player player
Definition: EClass.cs:12
static CoreDebug debug
Definition: EClass.cs:48
SurvivalManager survival
Definition: Game.cs:224
bool IsSurvival
Definition: Game.cs:272
Thing FindThing(Func< Thing, bool > func)
Definition: Map.cs:2592
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
ReturnInfo returnInfo
Definition: Player.cs:789
override bool CanOnlyCarry
override void TrySetAct(ActPlan p)
override bool IsLightOn
override bool CanBeDestroyed
override bool CanPutAway
Definition: Trait.cs:7
void Add(ZoneEvent e, bool allowDuplicate=false)
ZoneEventManager events
Definition: Zone.cs:40