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

Public Member Functions

override bool Perform ()
 
- Public Member Functions inherited from Ability
override bool CanLink (ElementContainer owner)
 
override int GetSourceValue (int v, int lv, SourceValueType type)
 
override int GetPower (Card c)
 
override void OnChangeValue ()
 
- 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)
 

Static Public Member Functions

static void Ride (Chara host, Chara t, bool parasite=false, bool talk=true)
 
static void Unride (Chara host, bool parasite=false, bool talk=true)
 
- 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)
 

Properties

virtual bool IsParasite [get]
 
- Properties inherited from Ability
override bool ShowBonuses [get]
 
override bool CanPressRepeat [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 }
 
- 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
 
- 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 3 of file ActRide.cs.

Member Function Documentation

◆ Perform()

override bool ActRide.Perform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 7 of file ActRide.cs.

8 {
9 List<Chara> list = Act.TP.ListCharas();
10 list.Reverse();
11 bool flag = false;
12 foreach (Chara item in list)
13 {
14 if (item.host != null || item.IsMultisize)
15 {
16 continue;
17 }
18 if (item == Act.CC)
19 {
20 if ((IsParasite && Act.CC.parasite != null) || (!IsParasite && Act.CC.ride != null))
21 {
23 flag = true;
24 break;
25 }
26 continue;
27 }
28 if (!item.trait.CanJoinPartyResident)
29 {
30 Msg.Say("ride_req");
31 return false;
32 }
33 if (item.memberType == FactionMemberType.Default && (EClass.debug.enable || (item.IsPCFaction && item.trait.CanJoinParty)))
34 {
36 flag = true;
37 break;
38 }
39 }
40 if (!flag)
41 {
42 Msg.Say("noTargetFound");
43 }
44 return false;
45 }
FactionMemberType
virtual bool IsParasite
Definition: ActRide.cs:5
static void Unride(Chara host, bool parasite=false, bool talk=true)
Definition: ActRide.cs:101
Definition: ACT.cs:62
static Point TP
Definition: ACT.cs:81
static Chara CC
Definition: ACT.cs:77
Definition: Chara.cs:10
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
bool enable
Definition: CoreDebug.cs:285
Definition: EClass.cs:5
static CoreDebug debug
Definition: EClass.cs:48
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
List< Chara > ListCharas()
Definition: Point.cs:1135

References Act.CC, EClass.debug, CoreDebug.enable, IsParasite, item, Point.ListCharas(), Chara.parasite, Ride, Chara.ride, Msg.Say(), Act.TP, and Unride().

◆ Ride()

static void ActRide.Ride ( Chara  host,
Chara  t,
bool  parasite = false,
bool  talk = true 
)
inlinestatic

Definition at line 47 of file ActRide.cs.

48 {
49 if (parasite)
50 {
51 if (host.parasite != null)
52 {
53 Unride(host, parasite: true);
54 }
55 host.parasite = t;
56 host.Say("parasite", host, t);
57 }
58 else
59 {
60 if (host.ride != null)
61 {
62 Unride(host);
63 }
64 host.ride = t;
65 host.Say("ride", host, t);
66 }
67 if (!t.IsPCFaction)
68 {
69 t.MakeAlly();
70 }
72 if (!parasite)
73 {
74 if (t.race.tag.Contains("ride"))
75 {
76 Msg.Say("ride_good");
77 }
78 if (t.race.tag.Contains("noRide"))
79 {
80 Msg.Say("ride_bad");
81 }
82 if (host.HasElement(1417) && t.HasCondition<ConTransmuteBroom>())
83 {
84 Msg.Say("ride_broom");
85 }
86 }
87 t.host = host;
89 if (talk)
90 {
91 host.PlaySound("ride");
92 t.Talk(parasite ? "parasite" : "ride");
93 }
94 host.SetDirtySpeed();
95 t.SetDirtySpeed();
96 host.SyncRide();
97 t.noMove = false;
98 host.Refresh();
99 }
bool HasElement(int ele, int req=1)
Definition: Card.cs:5214
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5404
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:5949
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
void Refresh(bool calledRecursive=false)
Definition: Chara.cs:1504
void SetDirtySpeed()
Definition: Chara.cs:1605
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:8568
override CardRenderer _CreateRenderer()
Definition: Chara.cs:5993
override bool IsPCFaction
Definition: Chara.cs:656
void MakeAlly(bool msg=true)
Definition: Chara.cs:2004
void SyncRide()
Definition: Chara.cs:3559
SourceRace.Row race
Definition: Chara.cs:449
static Chara pc
Definition: EClass.cs:14
void AddMemeber(Chara c, bool showMsg=false)
Definition: Party.cs:51

References Chara._CreateRenderer(), Party.AddMemeber(), Chara.HasCondition(), Card.HasElement(), Chara.IsPCFaction, Chara.MakeAlly(), Chara.parasite, Chara.party, EClass.pc, Card.PlaySound(), Chara.race, Chara.Refresh(), Chara.ride, Msg.Say(), Card.Say(), Chara.SetDirtySpeed(), Chara.SyncRide(), Card.Talk(), and Unride().

Referenced by TraitHitchingPost.OnActivateTrap(), and ConSleep.OnRemoved().

◆ Unride()

static void ActRide.Unride ( Chara  host,
bool  parasite = false,
bool  talk = true 
)
inlinestatic

Definition at line 101 of file ActRide.cs.

102 {
103 Chara chara = null;
104 if (parasite)
105 {
106 chara = host.parasite;
107 host.parasite = null;
108 host.Say("parasite_unride", host, chara);
109 }
110 else
111 {
112 chara = host.ride;
113 host.ride = null;
114 host.Say("ride_unride", host, chara);
115 }
116 chara.host = null;
117 chara._CreateRenderer();
118 if (talk)
119 {
120 chara.Talk(parasite ? "parasite_unride" : "ride_unride", null, null, forceSync: true);
121 }
122 host.PlaySound("ride");
123 host.SetDirtySpeed();
124 chara.SetDirtySpeed();
125 host.Refresh();
126 Point randomPoint = host.pos.GetRandomPoint(1);
127 if (randomPoint != null)
128 {
129 chara.MoveImmediate(randomPoint);
130 }
131 }
Point pos
Definition: Card.cs:55
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:5127
Definition: Point.cs:9
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:741

References Chara._CreateRenderer(), Point.GetRandomPoint(), Card.MoveImmediate(), Chara.parasite, Card.PlaySound(), Card.pos, Chara.Refresh(), Chara.ride, Card.Say(), Chara.SetDirtySpeed(), and Card.Talk().

Referenced by TraitHitchingPost.OnActivateTrap(), Perform(), Party.RemoveMember(), Ride(), AI_Slaughter.Run(), and ConSleep.Tick().

Property Documentation

◆ IsParasite

virtual bool ActRide.IsParasite
get

Definition at line 5 of file ActRide.cs.

Referenced by Perform().


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