Elin Decompiled Documentation EA 23.153 Nightly
Loading...
Searching...
No Matches
Act Class Reference
Inheritance diagram for Act:
Element EClass AIAct Ability ActBaseAttack ActBash ActChat ActClearWater 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)
 
void AddEncNote (UINote n, Card Card, ElementContainer.NoteMode mode=ElementContainer.NoteMode.Default, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
 
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 rndSeed (int a, int seed)
 
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 Act CurrentAct
 
- 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 317 of file ACT.cs.

318 {
319 CC = _cc;
320 TC = _tc;
321 TP.Set(_tp ?? TC?.pos ?? CC.pos);
323 if (forcePt && tt.Range == TargetRange.Self && !CC.IsPC)
324 {
325 tt = TargetType.Chara;
326 }
328 {
329 return false;
330 }
331 if (tt.Range == TargetRange.Self)
332 {
333 TP.Set(CC.pos);
334 return CanPerform();
335 }
337 {
338 Chara firstChara = TP.FirstChara;
339 if (firstChara != null && firstChara.IsPCFactionOrMinion)
340 {
341 bool flag = base.source.tag.Contains("neg");
342 if (base.source.id != 6011 && flag && !EInput.isShiftDown)
343 {
344 return false;
345 }
346 }
347 }
348 if (!(this is ActMelee) && tt.Range == TargetRange.Chara && (TC == null || !CC.CanSee(TC)))
349 {
350 return false;
351 }
352 bool distCheck = DistCheck(CC.pos, TP);
353 if (!distCheck && (CC.IsMultisize || (TC != null && TC.IsMultisize)))
354 {
355 if (CC.IsMultisize)
356 {
357 CC.ForeachPoint(delegate(Point p, bool main)
358 {
359 DistCheckMulti(p, TC);
360 });
361 }
362 else
363 {
364 DistCheckMulti(CC.pos, TC);
365 }
366 }
367 if (!distCheck)
368 {
369 return false;
370 }
371 return CanPerform();
372 bool DistCheck(Point p1, Point p2)
373 {
374 int num = p1.Distance(p2);
375 if (tt.RequireLos)
376 {
377 if (CC.IsPC)
378 {
379 if (!p2.IsSync)
380 {
381 return false;
382 }
383 }
384 else if ((num != 1 || !CC.IsMultisize) && !Los.IsVisible(p1, p2))
385 {
386 return false;
387 }
388 }
389 if (num >= tt.LimitDist)
390 {
391 return false;
392 }
393 if (num >= MaxRadius)
394 {
395 return false;
396 }
397 if (tt.RequireChara && !p2.HasChara)
398 {
399 return false;
400 }
401 if (tt.CanOnlyTargetEnemy)
402 {
403 foreach (Chara chara in p2.Charas)
404 {
405 if (CC.IsHostile(chara))
406 {
407 return true;
408 }
409 }
410 return false;
411 }
412 return true;
413 }
414 void DistCheckMulti(Point p1, Card c)
415 {
416 if (c == null && !distCheck)
417 {
418 distCheck = DistCheck(p1, TP);
419 }
420 else
421 {
422 c.ForeachPoint(delegate(Point p, bool main)
423 {
424 if (!distCheck)
425 {
426 distCheck = DistCheck(p1, p);
427 }
428 });
429 }
430 }
431 }
TargetRange
Definition: TargetRange.cs:2
virtual bool LocalAct
Definition: ACT.cs:171
static Point TP
Definition: ACT.cs:81
static bool forcePt
Definition: ACT.cs:87
virtual TargetType TargetType
Definition: ACT.cs:142
static Chara CC
Definition: ACT.cs:77
virtual int MaxRadius
Definition: ACT.cs:139
virtual bool CanPerform()
Definition: ACT.cs:303
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2208
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:7400
Point pos
Definition: Card.cs:55
Definition: Chara.cs:10
override bool IsPC
Definition: Chara.cs:608
bool CanSee(Card c)
Definition: Chara.cs:1070
SourceChara.Row source
Definition: Chara.cs:154
override bool IsMultisize
Definition: Chara.cs:702
bool IsHostile()
Definition: Chara.cs:6034
bool shiftToUseNegativeAbilityOnSelf
Definition: CoreConfig.cs:193
new GameConfig game
Definition: CoreConfig.cs:600
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:491
bool IsSync
Definition: Point.cs:332
List< Chara > Charas
Definition: Point.cs:328
int Distance(Point p)
Definition: Point.cs:969
Chara FirstChara
Definition: Point.cs:276
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 257 of file ACT.cs.

258 {
259 if (!IsCrime)
260 {
261 return EClass.Colors.colorAct;
262 }
264 }
virtual bool IsCrime
Definition: ACT.cs:179
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 181 of file ACT.cs.

182 {
183 return CursorIcon;
184 }
virtual CursorInfo CursorIcon
Definition: ACT.cs:97

References CursorIcon.

◆ GetHintText()

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

Reimplemented in ActMelee.

Definition at line 210 of file ACT.cs.

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

References GetText().

◆ GetSprite()

override Sprite Act.GetSprite ( )
inlinevirtual

Reimplemented from Element.

Definition at line 191 of file ACT.cs.

192 {
193 return base.source.GetSprite();
194 }

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

◆ GetStateIcon()

virtual MultiSprite Act.GetStateIcon ( )
inlinevirtual

Reimplemented in AI_PassTime, and AIAct.

Definition at line 186 of file ACT.cs.

187 {
188 return null;
189 }

◆ 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 215 of file ACT.cs.

216 {
217 if (base.source != null)
218 {
219 id = base.source.id;
220 }
221 if (id == 0)
222 {
223 if (!Lang.Has(ToString()))
224 {
225 return ToString() + "/" + base.source?.ToString() + "/" + id;
226 }
227 return Lang.Get(ToString());
228 }
229 return Lang.ParseRaw(base.source.GetName(), str);
230 }
int id
Definition: ELEMENT.cs:248
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 232 of file ACT.cs.

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

References Card.GetExtraName().

Referenced by ActPlan.Item.GetText().

◆ IsTargetHostileParty()

bool Act.IsTargetHostileParty ( )
inline

Definition at line 241 of file ACT.cs.

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

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

◆ IsToolValid()

virtual bool Act.IsToolValid ( )
inlinevirtual

Reimplemented in AIAct.

Definition at line 440 of file ACT.cs.

441 {
442 if (CC == EClass.pc && TOOL != null)
443 {
444 return TOOL.parent == EClass.pc;
445 }
446 return false;
447 }
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 201 of file ACT.cs.

202 {
203 if (!c.isChara)
204 {
205 return c.trait.CanBeAttacked;
206 }
207 return true;
208 }
Trait trait
Definition: Card.cs:49
virtual bool isChara
Definition: Card.cs:2019
virtual bool CanBeAttacked
Definition: Trait.cs:163

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 469 of file ACT.cs.

470 {
471 EClass._map.ForeachSphere(EClass.pc.pos.x, EClass.pc.pos.z, base.act.MaxRadius, delegate(Point p)
472 {
473 if (!p.HasBlock && ShouldMapHighlight(p))
474 {
475 p.SetHighlight(8);
476 }
477 });
478 }
virtual bool ShouldMapHighlight(Point p)
Definition: ACT.cs:480
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:1404
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, ActClearWater, ActCryRage, ActDrawWater, ActDreamBug, ActItem, ActKick, ActMelee, ActMultihit, ActNTR, ActPick, ActPray, ActQuickCraft, ActRanged, ActRestrain, ActRide, ActRush, ActSummonGuard, ActSwarm, ActThrow, ActWait, ActWater, ActZap, AI_Shear, AI_Slaughter, AI_Steal, AIAct, DynamicAct, and DynamicAIAct.

Definition at line 266 of file ACT.cs.

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

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

References CanPerform(), and Perform().

◆ SetImage()

new void Act.SetImage ( Image  image)
inline

Definition at line 454 of file ACT.cs.

455 {
456 image.sprite = GetSprite() ?? EClass.core.refs.icons.defaultAbility;
457 if (!base.source.aliasRef.IsEmpty())
458 {
459 image.color = EClass.setting.elements[base.source.aliasRef].colorSprite;
460 }
461 else
462 {
463 image.color = Color.white;
464 }
465 image.rectTransform.pivot = new Vector2(0.5f, 0.5f);
466 image.SetNativeSize();
467 }
override Sprite GetSprite()
Definition: ACT.cs:191
Sprite defaultAbility
Definition: CoreRef.cs:116
Icons icons
Definition: CoreRef.cs:345
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 433 of file ACT.cs.

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

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

◆ SetTool()

static void Act.SetTool ( Thing  t)
inlinestatic

Definition at line 449 of file ACT.cs.

450 {
451 TOOL = t;
452 }

References TOOL.

◆ ShouldMapHighlight()

virtual bool Act.ShouldMapHighlight ( Point  p)
inlinevirtual

Definition at line 480 of file ACT.cs.

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

References EClass.pc.

Referenced by OnMarkMapHighlights().

◆ ShowMouseHint()

virtual bool Act.ShowMouseHint ( Card  c)
inlinevirtual

Reimplemented in ActMelee.

Definition at line 196 of file ACT.cs.

197 {
198 return true;
199 }

Member Data Documentation

◆ CC

◆ CurrentAct

Act Act.CurrentAct
static

Definition at line 89 of file ACT.cs.

Referenced by Card.SpawnLoot().

◆ 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 123 of file ACT.cs.

◆ CanPressRepeat

virtual bool Act.CanPressRepeat
get

Definition at line 121 of file ACT.cs.

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

◆ CanRapidFire

virtual bool Act.CanRapidFire
get

Definition at line 173 of file ACT.cs.

Referenced by Chara.UseAbility().

◆ CloseLayers

virtual bool Act.CloseLayers
get

Definition at line 105 of file ACT.cs.

◆ CursorIcon

virtual CursorInfo Act.CursorIcon
get

Definition at line 97 of file ACT.cs.

Referenced by GetCursorIcon().

◆ DropHeldOnStart

virtual bool Act.DropHeldOnStart
get

Definition at line 119 of file ACT.cs.

Referenced by AIAct.Start().

◆ ElementPowerMod

virtual int Act.ElementPowerMod
get

Definition at line 111 of file ACT.cs.

Referenced by ActEffect.DamageEle().

◆ HaveLongPressAction

virtual bool Act.HaveLongPressAction
get

Definition at line 133 of file ACT.cs.

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

◆ HideRightInfo

virtual bool Act.HideRightInfo
get

Definition at line 131 of file ACT.cs.

◆ ID

virtual string Act.ID
get

Definition at line 99 of file ACT.cs.

Referenced by ActPlan.Item.Perform().

◆ IsAct

virtual bool Act.IsAct
get

Definition at line 101 of file ACT.cs.

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

◆ IsCrime

virtual bool Act.IsCrime
get

Definition at line 179 of file ACT.cs.

Referenced by GetActPlanColor().

◆ IsHostileAct

virtual bool Act.IsHostileAct
get

Definition at line 129 of file ACT.cs.

Referenced by Zone.IsCrime().

◆ LeftHand

virtual int Act.LeftHand
get

Definition at line 107 of file ACT.cs.

Referenced by AIAct.Start().

◆ LocalAct

virtual bool Act.LocalAct
get

◆ MaxRadius

virtual int Act.MaxRadius
get

Definition at line 139 of file ACT.cs.

Referenced by CanPerform().

◆ PerformDistance

virtual int Act.PerformDistance
get

Definition at line 137 of file ACT.cs.

Referenced by ActPlan.Item.Perform().

◆ PickHeldOnStart

virtual bool Act.PickHeldOnStart
get

Definition at line 117 of file ACT.cs.

Referenced by AIAct.Start().

◆ Radius

virtual float Act.Radius
get

Definition at line 135 of file ACT.cs.

◆ RapidDelay

virtual float Act.RapidDelay
get

Definition at line 175 of file ACT.cs.

Referenced by Chara.UseAbility().

◆ RequireTool

virtual bool Act.RequireTool
get

Definition at line 127 of file ACT.cs.

◆ ResetAxis

virtual bool Act.ResetAxis
get

Definition at line 125 of file ACT.cs.

◆ RightHand

virtual int Act.RightHand
get

Definition at line 109 of file ACT.cs.

Referenced by AIAct.Start().

◆ ShowAuto

virtual bool Act.ShowAuto
get

Definition at line 177 of file ACT.cs.

◆ ShowMapHighlight

virtual bool Act.ShowMapHighlight
get

Definition at line 113 of file ACT.cs.

◆ ShowMapHighlightBlock

virtual bool Act.ShowMapHighlightBlock
get

Definition at line 115 of file ACT.cs.

◆ ShowPotential

override bool Act.ShowPotential
get

Definition at line 91 of file ACT.cs.

◆ ShowRelativeAttribute

override bool Act.ShowRelativeAttribute
get

Definition at line 95 of file ACT.cs.

◆ TargetType

virtual TargetType Act.TargetType
get

Definition at line 141 of file ACT.cs.

142 {
143 get
144 {
145 if (!base.source.target.IsEmpty())
146 {
147 switch (base.source.target)
148 {
149 case "Enemy":
150 return TargetType.Enemy;
151 case "Chara":
152 return TargetType.Chara;
153 case "Ground":
154 return TargetType.Ground;
155 case "Neighbor":
157 case "Self":
158 return TargetType.Self;
159 case "Select":
160 return TargetType.Select;
161 case "Party":
162 return TargetType.Party;
163 case "SelfParty":
164 return TargetType.SelfParty;
165 }
166 }
167 return TargetType.Any;
168 }
169 }
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 93 of file ACT.cs.

◆ WillEndTurn

virtual bool Act.WillEndTurn
get

Definition at line 103 of file ACT.cs.


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