Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
Act Class Reference
Inheritance diagram for Act:
Element EClass AIAct Ability ActBaseAttack ActBash ActChat ActDrawWater ActItem ActKick ActNoItem ActPick ActPray ActRestrain ActSummonGuard ActWait ActWater ActZap DynamicAct Wait

Classes

struct  Cost
 

Public Types

enum  CostType { None , MP , SP }
 

Public Member Functions

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 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

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
 

Properties

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 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
 

Detailed Description

Definition at line 61 of file ACT.cs.

Member Enumeration Documentation

◆ CostType

Enumerator
None 
MP 
SP 

Definition at line 63 of file ACT.cs.

64 {
65 None,
66 MP,
67 SP
68 }

Member Function Documentation

◆ CanPerform() [1/2]

◆ CanPerform() [2/2]

bool Act.CanPerform ( Chara  _cc,
Card  _tc = null,
Point  _tp = null 
)
inline

Definition at line 315 of file ACT.cs.

316 {
317 CC = _cc;
318 TC = _tc;
319 TP.Set(_tp ?? TC?.pos ?? CC.pos);
321 if (forcePt && tt.Range == TargetRange.Self && !CC.IsPC)
322 {
323 tt = TargetType.Chara;
324 }
326 {
327 return false;
328 }
329 if (tt.Range == TargetRange.Self)
330 {
331 TP.Set(CC.pos);
332 return CanPerform();
333 }
335 {
336 Chara firstChara = TP.FirstChara;
337 if (firstChara != null && firstChara.IsPCFactionOrMinion)
338 {
339 bool flag = base.source.tag.Contains("neg");
340 if (base.source.id != 6011 && flag && !EInput.isShiftDown)
341 {
342 return false;
343 }
344 }
345 }
346 if (!(this is ActMelee) && tt.Range == TargetRange.Chara && (TC == null || !CC.CanSee(TC)))
347 {
348 return false;
349 }
350 bool distCheck = DistCheck(CC.pos, TP);
351 if (!distCheck && (CC.IsMultisize || (TC != null && TC.IsMultisize)))
352 {
353 if (CC.IsMultisize)
354 {
355 CC.ForeachPoint(delegate(Point p, bool main)
356 {
357 DistCheckMulti(p, TC);
358 });
359 }
360 else
361 {
362 DistCheckMulti(CC.pos, TC);
363 }
364 }
365 if (!distCheck)
366 {
367 return false;
368 }
369 return CanPerform();
370 bool DistCheck(Point p1, Point p2)
371 {
372 int num = p1.Distance(p2);
373 if (tt.RequireLos)
374 {
375 if (CC.IsPC)
376 {
377 if (!p2.IsSync)
378 {
379 return false;
380 }
381 }
382 else if ((num != 1 || !CC.IsMultisize) && !Los.IsVisible(p1, p2))
383 {
384 return false;
385 }
386 }
387 if (num >= tt.LimitDist)
388 {
389 return false;
390 }
391 if (num >= MaxRadius)
392 {
393 return false;
394 }
395 if (tt.RequireChara && !p2.HasChara)
396 {
397 return false;
398 }
399 if (tt.CanOnlyTargetEnemy)
400 {
401 foreach (Chara chara in p2.Charas)
402 {
403 if (CC.IsHostile(chara))
404 {
405 return true;
406 }
407 }
408 return false;
409 }
410 return true;
411 }
412 void DistCheckMulti(Point p1, Card c)
413 {
414 if (c == null && !distCheck)
415 {
416 distCheck = DistCheck(p1, TP);
417 }
418 else
419 {
420 c.ForeachPoint(delegate(Point p, bool main)
421 {
422 if (!distCheck)
423 {
424 distCheck = DistCheck(p1, p);
425 }
426 });
427 }
428 }
429 }
TargetRange
Definition: TargetRange.cs:2
virtual bool LocalAct
Definition: ACT.cs:169
static Point TP
Definition: ACT.cs:81
static bool forcePt
Definition: ACT.cs:87
virtual TargetType TargetType
Definition: ACT.cs:140
static Chara CC
Definition: ACT.cs:77
virtual int MaxRadius
Definition: ACT.cs:137
virtual bool CanPerform()
Definition: ACT.cs:301
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2132
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:6942
Point pos
Definition: Card.cs:55
Definition: Chara.cs:10
override bool IsPC
Definition: Chara.cs:597
bool CanSee(Card c)
Definition: Chara.cs:1027
SourceChara.Row source
Definition: Chara.cs:143
override bool IsMultisize
Definition: Chara.cs:691
bool IsHostile()
Definition: Chara.cs:5884
bool shiftToUseNegativeAbilityOnSelf
Definition: CoreConfig.cs:193
new GameConfig game
Definition: CoreConfig.cs:596
CoreConfig config
Definition: Core.cs:70
Definition: EClass.cs:5
static Core core
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:20
Definition: EInput.cs:8
static bool isShiftDown
Definition: EInput.cs:261
Definition: Los.cs:5
static bool IsVisible(Point p1, Point p2, Action< Point, bool > _onVisit=null)
Definition: Los.cs:167
Definition: Point.cs:9
Point Set(int _x, int _z)
Definition: Point.cs:479
bool IsSync
Definition: Point.cs:320
List< Chara > Charas
Definition: Point.cs:316
int Distance(Point p)
Definition: Point.cs:953
Chara FirstChara
Definition: Point.cs:264
bool HasChara
Definition: Point.cs:226
virtual bool IsRegion
Definition: Spatial.cs:501
Definition: TC.cs:4
virtual int LimitDist
Definition: TargetType.cs:45
virtual bool CanOnlyTargetEnemy
Definition: TargetType.cs:27
static TargetTypeChara Chara
Definition: TargetType.cs:17
virtual bool RequireChara
Definition: TargetType.cs:31
virtual TargetRange Range
Definition: TargetType.cs:25
virtual bool RequireLos
Definition: TargetType.cs:35

References EClass._zone, TargetType.CanOnlyTargetEnemy, CanPerform(), Chara.CanSee(), CC, TargetType.Chara, Point.Charas, Core.config, EClass.core, Point.Distance(), Point.FirstChara, forcePt, Card.ForeachPoint(), CoreConfig.game, Point.HasChara, Chara.IsHostile(), Chara.IsMultisize, Chara.IsPC, Card.IsPCFactionOrMinion, Spatial.IsRegion, EInput.isShiftDown, Point.IsSync, Los.IsVisible(), TargetType.LimitDist, LocalAct, MaxRadius, Card.pos, TargetType.Range, TargetType.RequireChara, TargetType.RequireLos, Point.Set(), CoreConfig.GameConfig.shiftToUseNegativeAbilityOnSelf, Chara.source, TargetType, and TP.

◆ GetActPlanColor()

virtual Color Act.GetActPlanColor ( )
inlinevirtual

Reimplemented in GoalAutoCombat.

Definition at line 255 of file ACT.cs.

256 {
257 if (!IsCrime)
258 {
259 return EClass.Colors.colorAct;
260 }
262 }
virtual bool IsCrime
Definition: ACT.cs:177
Color colorHostileAct
static ColorProfile Colors
Definition: EClass.cs:38

References ColorProfile.colorAct, ColorProfile.colorHostileAct, EClass.Colors, and IsCrime.

◆ GetCursorIcon()

virtual CursorInfo Act.GetCursorIcon ( Card  c)
inlinevirtual

Reimplemented in ActMelee.

Definition at line 179 of file ACT.cs.

180 {
181 return CursorIcon;
182 }
virtual CursorInfo CursorIcon
Definition: ACT.cs:95

References CursorIcon.

◆ GetHintText()

virtual string Act.GetHintText ( string  str = "")
inlinevirtual

Reimplemented in ActMelee.

Definition at line 208 of file ACT.cs.

209 {
210 return GetText(str);
211 }
virtual string GetText(string str="")
Definition: ACT.cs:213

References GetText().

◆ GetSprite()

override Sprite Act.GetSprite ( )
inlinevirtual

Reimplemented from Element.

Definition at line 189 of file ACT.cs.

190 {
191 return base.source.GetSprite();
192 }

Referenced by HotItemAct.GetSprite(), and SetImage().

◆ GetStateIcon()

virtual MultiSprite Act.GetStateIcon ( )
inlinevirtual

Reimplemented in AI_PassTime, and AIAct.

Definition at line 184 of file ACT.cs.

185 {
186 return null;
187 }

◆ GetText()

virtual string Act.GetText ( string  str = "")
inlinevirtual

Reimplemented in ActRanged, ActThrow, AI_Shear, AI_Slaughter, BaseTaskHarvest, DynamicAct, DynamicAIAct, TaskBuild, TaskClean, and TaskWater.

Definition at line 213 of file ACT.cs.

214 {
215 if (base.source != null)
216 {
217 id = base.source.id;
218 }
219 if (id == 0)
220 {
221 if (!Lang.Has(ToString()))
222 {
223 return ToString() + "/" + base.source?.ToString() + "/" + id;
224 }
225 return Lang.Get(ToString());
226 }
227 return Lang.ParseRaw(base.source.GetName(), str);
228 }
int id
Definition: ELEMENT.cs:240
Definition: Lang.cs:6
static string Get(string id)
Definition: Lang.cs:91
static string ParseRaw(string text, string val1, string val2=null, string val3=null, string val4=null, string val5=null)
Definition: Lang.cs:119
static bool Has(string id)
Definition: Lang.cs:100

References Lang.Get(), Lang.Has(), Element.id, and Lang.ParseRaw().

Referenced by GetHintText(), ActPlan.Item.GetText(), ActPlan.Item.GetTextContext(), and ActPlan.Item.Perform().

◆ GetTextSmall()

virtual string Act.GetTextSmall ( Card  c)
inlinevirtual

Reimplemented in ActMelee, BaseTaskHarvest, TaskDig, TaskHarvest, and TaskMine.

Definition at line 230 of file ACT.cs.

231 {
232 if (c == null)
233 {
234 return null;
235 }
236 return c.Name + c.GetExtraName();
237 }
virtual string GetExtraName()
Definition: Card.cs:2480

References Card.GetExtraName().

Referenced by ActPlan.Item.GetText().

◆ IsTargetHostileParty()

bool Act.IsTargetHostileParty ( )
inline

Definition at line 239 of file ACT.cs.

240 {
241 if (base.source.abilityType.Length != 0)
242 {
243 switch (base.source.abilityType[0])
244 {
245 case "debuff":
246 case "debuffStats":
247 case "attack":
248 case "dot":
249 return true;
250 }
251 }
252 return false;
253 }

Referenced by GoalCombat.TryUseAbility(), and Chara.UseAbility().

◆ IsToolValid()

virtual bool Act.IsToolValid ( )
inlinevirtual

Reimplemented in AIAct.

Definition at line 438 of file ACT.cs.

439 {
440 if (CC == EClass.pc && TOOL != null)
441 {
442 return TOOL.parent == EClass.pc;
443 }
444 return false;
445 }
static Thing TOOL
Definition: ACT.cs:83
static Chara pc
Definition: EClass.cs:14

References CC, EClass.pc, and TOOL.

◆ IsValidTC()

virtual bool Act.IsValidTC ( Card  c)
inlinevirtual

Reimplemented in AI_Shear, AI_Slaughter, and AI_Steal.

Definition at line 199 of file ACT.cs.

200 {
201 if (!c.isChara)
202 {
203 return c.trait.CanBeAttacked;
204 }
205 return true;
206 }
Trait trait
Definition: Card.cs:49
virtual bool isChara
Definition: Card.cs:1959
virtual bool CanBeAttacked
Definition: Trait.cs:159

References Trait.CanBeAttacked, Card.isChara, and Card.trait.

Referenced by HotItemAct.TrySetAct(), and TraitCatalyst.TrySetHeldAct().

◆ OnMarkMapHighlights()

virtual void Act.OnMarkMapHighlights ( )
inlinevirtual

Reimplemented in ActBolt, and ActRush.

Definition at line 467 of file ACT.cs.

468 {
469 EClass._map.ForeachSphere(EClass.pc.pos.x, EClass.pc.pos.z, base.act.MaxRadius, delegate(Point p)
470 {
471 if (!p.HasBlock && ShouldMapHighlight(p))
472 {
473 p.SetHighlight(8);
474 }
475 });
476 }
virtual bool ShouldMapHighlight(Point p)
Definition: ACT.cs:478
static Map _map
Definition: EClass.cs:18
void ForeachSphere(int _x, int _z, float r, Action< Point > action)
Definition: Map.cs:2358
void SetHighlight(int id)
Definition: Point.cs:1388
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool HasBlock
Definition: Point.cs:141

References EClass._map, Map.ForeachSphere(), Point.HasBlock, EClass.pc, Card.pos, Point.SetHighlight(), ShouldMapHighlight(), Point.x, and Point.z.

Referenced by HotItemGameAction.OnMarkMapHighlights().

◆ Perform() [1/2]

virtual bool Act.Perform ( )
inlinevirtual

Reimplemented in ActBash, ActChat, ActDrawWater, ActDreamBug, ActItem, ActKick, ActMelee, ActNTR, ActPick, ActPray, ActQuickCraft, ActRanged, ActRestrain, ActRide, ActRush, ActSummonGuard, ActThrow, ActWait, ActWater, ActZap, AI_Shear, AI_Slaughter, AI_Steal, AIAct, DynamicAct, and DynamicAIAct.

Definition at line 264 of file ACT.cs.

265 {
266 int num = id;
267 if ((num == 8230 || num == 8232) && TC.isThing)
268 {
269 int power = CC.elements.GetOrCreateElement(base.source.id).GetPower(CC);
270 ActEffect.Proc(base.source.proc[0].ToEnum<EffectId>(), power, BlessedState.Normal, CC, TC);
271 return true;
272 }
273 if (base.source.proc.Length != 0)
274 {
275 string text = base.source.aliasRef.IsEmpty(CC.MainElement.source.alias);
276 string text2 = base.source.proc[0];
277 if (text2 == "LulwyTrick" || text2 == "BuffStats")
278 {
279 text = base.source.proc[1];
280 }
281 else if (text == "mold")
282 {
283 text = CC.MainElement.source.alias;
284 }
285 if (TargetType.Range == TargetRange.Self && !forcePt)
286 {
287 TC = CC;
288 TP.Set(CC.pos);
289 }
290 int power2 = CC.elements.GetOrCreateElement(base.source.id).GetPower(CC);
291 ActEffect.ProcAt(base.source.proc[0].ToEnum<EffectId>(), power2, BlessedState.Normal, CC, TC, TP, base.source.tag.Contains("neg"), new ActRef
292 {
293 n1 = base.source.proc.TryGet(1, returnNull: true),
294 aliasEle = text,
295 act = this
296 });
297 }
298 return true;
299 }
BlessedState
Definition: BlessedState.cs:2
EffectId
Definition: EffectId.cs:2
static void Proc(EffectId id, Card cc, Card tc=null, int power=100, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:788
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:392
ElementContainerCard elements
Definition: Card.cs:37
Element MainElement
Definition: Chara.cs:702
Element GetOrCreateElement(Element ele)
SourceElement.Row source
Definition: ELEMENT.cs:263
virtual int GetPower(Card c)
Definition: ELEMENT.cs:884
Definition: ActRef.cs:2

References CC, Card.elements, forcePt, ElementContainer.GetOrCreateElement(), Element.GetPower(), Element.id, Chara.MainElement, Card.pos, ActEffect.Proc(), ActEffect.ProcAt(), TargetType.Range, Point.Set(), Element.source, and TP.

Referenced by ActMelee.Attack(), Thing.DoAct(), UIInventory.DoAct(), ActItem.Perform(), ActPlan.Item.Perform(), Perform(), and Chara.UseAbility().

◆ Perform() [2/2]

bool Act.Perform ( Chara  _cc,
Card  _tc = null,
Point  _tp = null 
)
inline

Definition at line 306 of file ACT.cs.

307 {
308 if (CanPerform(_cc, _tc, _tp))
309 {
310 return Perform();
311 }
312 return false;
313 }
virtual bool Perform()
Definition: ACT.cs:264

References CanPerform(), and Perform().

◆ SetImage()

new void Act.SetImage ( Image  image)
inline

Definition at line 452 of file ACT.cs.

453 {
454 image.sprite = GetSprite() ?? EClass.core.refs.icons.defaultAbility;
455 if (!base.source.aliasRef.IsEmpty())
456 {
457 image.color = EClass.setting.elements[base.source.aliasRef].colorSprite;
458 }
459 else
460 {
461 image.color = Color.white;
462 }
463 image.rectTransform.pivot = new Vector2(0.5f, 0.5f);
464 image.SetNativeSize();
465 }
override Sprite GetSprite()
Definition: ACT.cs:189
Sprite defaultAbility
Definition: CoreRef.cs:114
Icons icons
Definition: CoreRef.cs:339
CoreRef refs
Definition: Core.cs:51
static GameSetting setting
Definition: EClass.cs:34
UD_String_ElementRef elements
Definition: GameSetting.cs:315

References Color, EClass.core, CoreRef.Icons.defaultAbility, GameSetting.elements, GetSprite(), CoreRef.icons, Core.refs, and EClass.setting.

Referenced by ButtonAbility.SetAct(), and HotItemAct.SetImage().

◆ SetReference()

static void Act.SetReference ( Chara  _cc,
Card  _tc = null,
Point  _tp = null 
)
inlinestatic

Definition at line 431 of file ACT.cs.

432 {
433 CC = _cc;
434 TC = _tc;
435 TP.Set(_tp ?? TC.pos);
436 }

References CC, Point.Set(), and TP.

◆ SetTool()

static void Act.SetTool ( Thing  t)
inlinestatic

Definition at line 447 of file ACT.cs.

448 {
449 TOOL = t;
450 }

References TOOL.

◆ ShouldMapHighlight()

virtual bool Act.ShouldMapHighlight ( Point  p)
inlinevirtual

Definition at line 478 of file ACT.cs.

479 {
480 if (base.act.TargetType.ShowMapHighlight && base.act.ShowMapHighlight)
481 {
482 return base.act.CanPerform(EClass.pc, null, p);
483 }
484 return false;
485 }

References EClass.pc.

Referenced by OnMarkMapHighlights().

◆ ShowMouseHint()

virtual bool Act.ShowMouseHint ( Card  c)
inlinevirtual

Reimplemented in ActMelee.

Definition at line 194 of file ACT.cs.

195 {
196 return true;
197 }

Member Data Documentation

◆ CC

◆ forcePt

bool Act.forcePt
static

Definition at line 87 of file ACT.cs.

Referenced by CanPerform(), and Perform().

◆ powerMod

int Act.powerMod = 100
static

Definition at line 85 of file ACT.cs.

◆ TC

◆ TOOL

Thing Act.TOOL
static

Definition at line 83 of file ACT.cs.

Referenced by IsToolValid(), AIAct.IsToolValid(), TaskCut.OnProgress(), and SetTool().

◆ TP

Property Documentation

◆ CanAutofire

virtual bool Act.CanAutofire
get

Definition at line 121 of file ACT.cs.

◆ CanPressRepeat

virtual bool Act.CanPressRepeat
get

Definition at line 119 of file ACT.cs.

Referenced by HotItemAct.TrySetAct(), and TraitCatalyst.TrySetHeldAct().

◆ CanRapidFire

virtual bool Act.CanRapidFire
get

Definition at line 171 of file ACT.cs.

Referenced by Chara.UseAbility().

◆ CloseLayers

virtual bool Act.CloseLayers
get

Definition at line 103 of file ACT.cs.

◆ CursorIcon

virtual CursorInfo Act.CursorIcon
get

Definition at line 95 of file ACT.cs.

Referenced by GetCursorIcon().

◆ DropHeldOnStart

virtual bool Act.DropHeldOnStart
get

Definition at line 117 of file ACT.cs.

Referenced by AIAct.Start().

◆ ElementPowerMod

virtual int Act.ElementPowerMod
get

Definition at line 109 of file ACT.cs.

Referenced by ActEffect.DamageEle().

◆ HaveLongPressAction

virtual bool Act.HaveLongPressAction
get

Definition at line 131 of file ACT.cs.

Referenced by Element._WriteNote(), ButtonAbility.TryUse(), and GoalCombat.TryUseAbility().

◆ HideRightInfo

virtual bool Act.HideRightInfo
get

Definition at line 129 of file ACT.cs.

◆ ID

virtual string Act.ID
get

Definition at line 97 of file ACT.cs.

Referenced by ActPlan.Item.Perform().

◆ IsAct

virtual bool Act.IsAct
get

Definition at line 99 of file ACT.cs.

Referenced by Thing.DoAct(), UIInventory.DoAct(), and ActPlan.Item.Perform().

◆ IsCrime

virtual bool Act.IsCrime
get

Definition at line 177 of file ACT.cs.

Referenced by GetActPlanColor().

◆ IsHostileAct

virtual bool Act.IsHostileAct
get

Definition at line 127 of file ACT.cs.

Referenced by Zone.IsCrime().

◆ LeftHand

virtual int Act.LeftHand
get

Definition at line 105 of file ACT.cs.

Referenced by AIAct.Start().

◆ LocalAct

virtual bool Act.LocalAct
get

◆ MaxRadius

virtual int Act.MaxRadius
get

Definition at line 137 of file ACT.cs.

Referenced by CanPerform().

◆ PerformDistance

virtual int Act.PerformDistance
get

Definition at line 135 of file ACT.cs.

Referenced by ActPlan.Item.Perform().

◆ PickHeldOnStart

virtual bool Act.PickHeldOnStart
get

Definition at line 115 of file ACT.cs.

Referenced by AIAct.Start().

◆ Radius

virtual float Act.Radius
get

Definition at line 133 of file ACT.cs.

◆ RapidDelay

virtual float Act.RapidDelay
get

Definition at line 173 of file ACT.cs.

Referenced by Chara.UseAbility().

◆ RequireTool

virtual bool Act.RequireTool
get

Definition at line 125 of file ACT.cs.

◆ ResetAxis

virtual bool Act.ResetAxis
get

Definition at line 123 of file ACT.cs.

◆ RightHand

virtual int Act.RightHand
get

Definition at line 107 of file ACT.cs.

Referenced by AIAct.Start().

◆ ShowAuto

virtual bool Act.ShowAuto
get

Definition at line 175 of file ACT.cs.

◆ ShowMapHighlight

virtual bool Act.ShowMapHighlight
get

Definition at line 111 of file ACT.cs.

◆ ShowMapHighlightBlock

virtual bool Act.ShowMapHighlightBlock
get

Definition at line 113 of file ACT.cs.

◆ ShowPotential

override bool Act.ShowPotential
get

Definition at line 89 of file ACT.cs.

◆ ShowRelativeAttribute

override bool Act.ShowRelativeAttribute
get

Definition at line 93 of file ACT.cs.

◆ TargetType

virtual TargetType Act.TargetType
get

Definition at line 139 of file ACT.cs.

140 {
141 get
142 {
143 if (!base.source.target.IsEmpty())
144 {
145 switch (base.source.target)
146 {
147 case "Enemy":
148 return TargetType.Enemy;
149 case "Chara":
150 return TargetType.Chara;
151 case "Ground":
152 return TargetType.Ground;
153 case "Neighbor":
155 case "Self":
156 return TargetType.Self;
157 case "Select":
158 return TargetType.Select;
159 case "Party":
160 return TargetType.Party;
161 case "SelfParty":
162 return TargetType.SelfParty;
163 }
164 }
165 return TargetType.Any;
166 }
167 }
static TargetTypeSelf Self
Definition: TargetType.cs:7
static TargetTypeGround Ground
Definition: TargetType.cs:15
static TargetTypeSelect Select
Definition: TargetType.cs:11
static TargetTypeSelfAndNeighbor SelfAndNeighbor
Definition: TargetType.cs:13
static TargetTypeParty Party
Definition: TargetType.cs:23
static TargetTypeSelfParty SelfParty
Definition: TargetType.cs:9
static TargetTypeEnemy Enemy
Definition: TargetType.cs:19
static TargetTypeAny Any
Definition: TargetType.cs:5

Referenced by Element._WriteNote(), ButtonAbility.CanAutoUse(), CanPerform(), TraitCatalyst.CanUse(), ButtonAbility.SetAct(), GoalCombat.TryUseAbility(), and Chara.UseAbility().

◆ UsePotential

override bool Act.UsePotential
get

Definition at line 91 of file ACT.cs.

◆ WillEndTurn

virtual bool Act.WillEndTurn
get

Definition at line 101 of file ACT.cs.


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