Elin Decompiled Documentation EA 23.303 Nightly
Loading...
Searching...
No Matches
TraitToolWaterCan.cs
Go to the documentation of this file.
1using UnityEngine;
2
4{
5 public int MaxCharge => Mathf.Max(1, owner.material.hardness / 4 + Mathf.Clamp(owner.QualityLv * 2, 0, 40) + 3);
6
7 public override bool HasCharges => true;
8
9 public override void TrySetHeldAct(ActPlan p)
10 {
11 if (p.TrySetAct(new ActDrawWater
12 {
13 waterCan = this
14 }, owner))
15 {
16 return;
17 }
18 foreach (Chara item in p.pos.ListCharas())
19 {
20 if (item.IsPCFactionOrMinion && item.HasCondition<ConBurning>() && p.TrySetAct(new ActWater
21 {
22 waterCan = this
23 }, owner))
24 {
25 return;
26 }
27 }
28 if (!p.TrySetAct(new TaskWater
29 {
30 dest = p.pos
31 }, owner))
32 {
33 p.TrySetAct(new ActWater
34 {
35 waterCan = this
36 }, owner);
37 }
38 }
39}
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:372
SourceMaterial.Row material
Definition: Card.cs:2091
int QualityLv
Definition: Card.cs:2469
Definition: Chara.cs:10
override bool HasCharges
override void TrySetHeldAct(ActPlan p)
Card owner
Definition: Trait.cs:28