Elin Modding Docs Doc
Loading...
Searching...
No Matches
AI_Grab.2.cs
1using System;
2
3// Token: 0x020001E0 RID: 480
4public class AI_Grab<T> : AI_Grab where T : Trait
5{
6 // Token: 0x06000DD9 RID: 3545 RVA: 0x0006A698 File Offset: 0x00068898
7 public override Card GetTarget()
8 {
9 Trait random = EClass._map.Installed.traits.GetTraitSet<T>().GetRandom();
10 if (random == null)
11 {
12 random = EClass._map.Stocked.traits.GetTraitSet<T>().GetRandom();
13 }
14 if (random == null)
15 {
16 return null;
17 }
18 return random.owner;
19 }
20
21 // Token: 0x06000DDA RID: 3546 RVA: 0x0006A6E7 File Offset: 0x000688E7
22 public override bool IsValidTarget(Card c)
23 {
24 return c != null && c.trait is T;
25 }
26}
Definition Card.cs:13
Definition Trait.cs:9