Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ActRestrain Class Reference
Inheritance diagram for ActRestrain:
Act Element EClass

Public Member Functions

override bool CanPerform ()
 
override bool Perform ()
 
- Public Member Functions inherited from Act
virtual CursorInfo GetCursorIcon (Card c)
 
virtual MultiSprite GetStateIcon ()
 
override Sprite GetSprite ()
 
virtual bool ShowMouseHint (Card c)
 
virtual bool IsValidTC (Card c)
 
virtual string GetHintText (string str="")
 
virtual string GetText (string str="")
 
virtual string GetTextSmall (Card c)
 
bool IsTargetHostileParty ()
 
virtual Color GetActPlanColor ()
 
virtual bool Perform ()
 
virtual bool CanPerform ()
 
bool Perform (Chara _cc, Card _tc=null, Point _tp=null)
 
bool CanPerform (Chara _cc, Card _tc=null, Point _tp=null)
 
virtual bool IsToolValid ()
 
new void SetImage (Image image)
 
virtual void OnMarkMapHighlights ()
 
virtual bool ShouldMapHighlight (Point p)
 
- Public Member Functions inherited from Element
virtual SourceElement.Row GetSource ()
 
virtual int GetSourcePotential (int v)
 
virtual Sprite GetSprite ()
 
int GetMaterialSourceValue (Thing t, int v)
 
virtual int GetSourceValue (int v, int lv, SourceValueType type)
 
virtual Sprite GetIcon (string suffix="")
 
bool IsActive (Card c)
 
int SortVal (bool charaSheet=false)
 
virtual bool CanLink (ElementContainer owner)
 
bool HasTag (string tag)
 
void SetImage (Image i)
 
virtual string GetDetail ()
 
bool IsFactionElement (Chara c)
 
Element GetParent (Card c)
 
void WriteNote (UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
 
void WriteNoteWithRef (UINote n, ElementContainer owner, Action< UINote > onWriteNote, Element refEle)
 
void _WriteNote (UINote n, Chara c, Act act)
 
void AddHeaderAbility (UINote n)
 
void _WriteNote (UINote n, ElementContainer owner, Action< UINote > onWriteNote, bool isRef, bool addHeader=true)
 
virtual void OnWriteNote (UINote n, ElementContainer owner)
 
virtual void OnChangeValue ()
 
void CheckLevelBonus (ElementContainer owner, UINote n=null)
 
int GetSortVal (UIList.SortMode m)
 
virtual Act.Cost GetCost (Chara c)
 
virtual int GetPower (Card c)
 
virtual void SetTextValue (UIText text)
 
virtual bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
virtual void WritePurchaseReq (UINote n, int lv=1)
 

Public Attributes

TraitShackle shackle
 
- Public Attributes inherited from Element
SourceElement.Row _source
 
int id
 
int vBase
 
int vExp
 
int vPotential
 
int vTempPotential
 
int vLink
 
int vSource
 
int vSourcePotential
 
ElementContainer owner
 

Properties

override TargetType TargetType [get]
 
override int MaxRadius [get]
 
override int PerformDistance [get]
 
override bool IsHostileAct [get]
 
- Properties inherited from Act
override bool ShowPotential [get]
 
override bool UsePotential [get]
 
override bool ShowRelativeAttribute [get]
 
virtual CursorInfo CursorIcon [get]
 
virtual string ID [get]
 
virtual bool IsAct [get]
 
virtual bool WillEndTurn [get]
 
virtual bool CloseLayers [get]
 
virtual int LeftHand [get]
 
virtual int RightHand [get]
 
virtual int ElementPowerMod [get]
 
virtual bool ShowMapHighlight [get]
 
virtual bool ShowMapHighlightBlock [get]
 
virtual bool PickHeldOnStart [get]
 
virtual bool DropHeldOnStart [get]
 
virtual bool CanPressRepeat [get]
 
virtual bool CanAutofire [get]
 
virtual bool ResetAxis [get]
 
virtual bool RequireTool [get]
 
virtual bool IsHostileAct [get]
 
virtual bool HideRightInfo [get]
 
virtual bool HaveLongPressAction [get]
 
virtual float Radius [get]
 
virtual int PerformDistance [get]
 
virtual int MaxRadius [get]
 
virtual TargetType TargetType [get]
 
virtual bool LocalAct [get]
 
virtual bool CanRapidFire [get]
 
virtual float RapidDelay [get]
 
virtual bool ShowAuto [get]
 
virtual bool IsCrime [get]
 
- Properties inherited from Element
SourceElement.Row source [get]
 
virtual int DisplayValue [get]
 
virtual int MinValue [get]
 
int Value [get]
 
int ValueWithoutLink [get]
 
virtual int MinPotential [get]
 
int Potential [get]
 
virtual bool CanGainExp [get]
 
bool IsFlag [get]
 
virtual string Name [get]
 
virtual string FullName [get]
 
virtual int ExpToNext [get]
 
virtual bool UseExpMod [get]
 
virtual int CostTrain [get]
 
virtual int CostLearn [get]
 
virtual bool ShowXP [get]
 
virtual bool ShowMsgOnValueChanged [get]
 
virtual bool ShowValue [get]
 
virtual bool ShowPotential [get]
 
virtual bool UsePotential [get]
 
virtual bool PotentialAsStock [get]
 
virtual bool ShowRelativeAttribute [get]
 
virtual bool ShowBonuses [get]
 
virtual string ShortName [get]
 
bool IsGlobalElement [get]
 
bool IsFactionWideElement [get]
 
bool IsPartyWideElement [get]
 
virtual bool ShowEncNumber [get]
 
bool IsTrait [get]
 
bool IsFoodTrait [get]
 
bool IsFoodTraitMain [get]
 
bool IsMainAttribute [get]
 
Act act [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Public Types inherited from Act
enum  CostType { None , MP , SP }
 
- Static Public Member Functions inherited from Act
static void SetReference (Chara _cc, Card _tc=null, Point _tp=null)
 
static void SetTool (Thing t)
 
- Static Public Member Functions inherited from Element
static string GetName (string alias)
 
static SourceElement.Row Get (int id)
 
static Dictionary< int, int > GetElementMap (int[] list)
 
static Dictionary< int, int > GetElementMap (int[] list, Dictionary< int, int > map)
 
static SourceElement.Row GetRandomElement (int lv=1)
 
static Element Create (int id, int v=0)
 
static Element Create (string id, int v=1)
 
static int GetId (string alias)
 
static int GetResistLv (int v)
 
static int GetResistDamage (int dmg, int v, int power=0)
 
- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from Act
static Chara CC
 
static Card TC
 
static Point TP = new Point()
 
static Thing TOOL
 
static int powerMod = 100
 
static bool forcePt
 
- Static Public Attributes inherited from Element
const int Div = 5
 
static Element Void = new Element()
 
static int[] List_MainAttributes = new int[9] { 70, 72, 71, 77, 74, 75, 76, 73, 79 }
 
static int[] List_MainAttributesMajor = new int[8] { 70, 72, 71, 77, 74, 75, 76, 73 }
 
static int[] List_Body = new int[4] { 70, 72, 71, 77 }
 
static int[] List_Mind = new int[4] { 74, 75, 76, 73 }
 
static List< SourceElement.RowListElements = new List<SourceElement.Row>()
 
static List< SourceElement.RowListAttackElements = new List<SourceElement.Row>()
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 1 of file ActRestrain.cs.

Member Function Documentation

◆ CanPerform()

override bool ActRestrain.CanPerform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 13 of file ActRestrain.cs.

14 {
15 Act.TC = Act.TP.FirstChara;
16 if (Act.TC == null || Act.TC.isRestrained || !Act.TC.IsAliveInCurrentZone || Act.TC.IsMultisize || Act.TC.Chara.host != null)
17 {
18 return false;
19 }
21 {
22 return false;
23 }
24 return true;
25 }
Definition: ACT.cs:62
static Card TC
Definition: ACT.cs:79
static Point TP
Definition: ACT.cs:81
virtual bool IsMultisize
Definition: Card.cs:2034
virtual Chara Chara
Definition: Card.cs:1946
bool isRestrained
Definition: Card.cs:538
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2003
virtual bool IsPCFaction
Definition: Card.cs:2129
Chara host
Definition: Chara.cs:33
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
Chara FirstChara
Definition: Point.cs:264
bool IsPCFaction
Definition: Zone.cs:464

References EClass._zone, Card.Chara, Point.FirstChara, Chara.host, Card.IsAliveInCurrentZone, Card.IsMultisize, Card.IsPCFaction, Zone.IsPCFaction, Card.isRestrained, Act.TC, and Act.TP.

◆ Perform()

override bool ActRestrain.Perform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 27 of file ActRestrain.cs.

28 {
29 Act.TC = Act.TP.FirstChara;
30 if (Act.TC.Chara.IsHostile() || Act.TC.IsMultisize || Act.TC.Chara.host != null)
31 {
32 Msg.Say("resist", Act.TC);
33 return true;
34 }
35 SE.Change();
37 {
40 }
41 shackle.Restrain(Act.TC, msg: true);
42 if (!Act.TC.IsPCFaction)
43 {
45 }
47 {
49 {
51 });
52 }
53 return true;
54 }
PlaceState
Definition: PlaceState.cs:2
TraitShackle shackle
Definition: ActRestrain.cs:3
void SetPlaceState(PlaceState newState, bool byPlayer=false)
Definition: Card.cs:3454
bool IsInstalled
Definition: Card.cs:2241
AIAct SetAI(AIAct g)
Definition: Chara.cs:8045
bool IsHostile()
Definition: Chara.cs:5884
static Player player
Definition: EClass.cs:12
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
void ModKarma(int a)
Definition: Player.cs:2289
virtual bool AllowTraining
Definition: TraitShackle.cs:13
void Restrain(Card tc, bool msg=false)
Definition: TraitShackle.cs:50
Card owner
Definition: Trait.cs:26
Card AddCard(Card t, Point point)
Definition: Zone.cs:1893

References EClass._zone, Zone.AddCard(), TraitShackle.AllowTraining, Card.Chara, Point.FirstChara, Chara.host, Chara.IsHostile(), Card.IsInstalled, Card.IsMultisize, Card.IsPCFaction, Zone.IsPCFaction, Player.ModKarma(), Trait.owner, EClass.player, TraitShackle.Restrain(), Msg.Say(), Chara.SetAI(), Card.SetPlaceState(), shackle, Act.TC, and Act.TP.

Referenced by TraitShackle.OnUse().

Member Data Documentation

◆ shackle

TraitShackle ActRestrain.shackle

Definition at line 3 of file ActRestrain.cs.

Referenced by Perform().

Property Documentation

◆ IsHostileAct

override bool ActRestrain.IsHostileAct
get

Definition at line 11 of file ActRestrain.cs.

◆ MaxRadius

override int ActRestrain.MaxRadius
get

Definition at line 7 of file ActRestrain.cs.

◆ PerformDistance

override int ActRestrain.PerformDistance
get

Definition at line 9 of file ActRestrain.cs.

◆ TargetType

override TargetType ActRestrain.TargetType
get

Definition at line 5 of file ActRestrain.cs.


The documentation for this class was generated from the following file: