Elin Decompiled Documentation EA 23.285 Nightly
Loading...
Searching...
No Matches
ActMoneySlap Class Reference
Inheritance diagram for ActMoneySlap:
Ability Act Element EClass ActMoneyThrow

Public Member Functions

override bool CanPerform ()
 
override bool Perform ()
 
- Public Member Functions inherited from Ability
override bool CanLink (ElementContainer owner)
 
override long GetSourceValue (long 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 ()
 
bool Perform (Chara _cc, Card _tc=null, Point _tp=null)
 
virtual bool ValidatePerform (Chara _cc, Card _tc, Point _tp)
 
virtual bool CanPerform ()
 
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 long GetSourceValue (long 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, bool shorten=false)
 
virtual bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
virtual void WritePurchaseReq (UINote n, int lv=1)
 

Static Public Member Functions

static void MoneyEffect (Chara owner, Chara c, int power, int chance=5)
 
- 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, bool useWeight=true)
 
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 long GetResistDamage (long dmg, int v, int power=0)
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
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

override bool CanPressRepeat [get]
 
- Properties inherited from Ability
override bool ShowBonuses [get]
 
override bool CanPressRepeat [get]
 
override bool LocalAct [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 ShouldEndMimicry [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]
 
- 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 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
 

Detailed Description

Definition at line 3 of file ActMoneySlap.cs.

Member Function Documentation

◆ CanPerform()

override bool ActMoneySlap.CanPerform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 7 of file ActMoneySlap.cs.

8 {
9 if (Act.TC != null)
10 {
11 return Act.CC.GetCurrency() > 0;
12 }
13 return false;
14 }
Definition: ACT.cs:62
static Card TC
Definition: ACT.cs:79
static Chara CC
Definition: ACT.cs:77
int GetCurrency(string id="money")
Definition: Card.cs:4057

References Act.CC, Card.GetCurrency(), and Act.TC.

◆ MoneyEffect()

static void ActMoneySlap.MoneyEffect ( Chara  owner,
Chara  c,
int  power,
int  chance = 5 
)
inlinestatic

Definition at line 53 of file ActMoneySlap.cs.

54 {
55 if (c != owner && EClass.rnd(chance) == 0)
56 {
57 if (EClass.rnd(2) == 0)
58 {
59 c.AddCondition<ConConfuse>(power);
60 }
61 if (EClass.rnd(2) == 0)
62 {
63 c.AddCondition<ConDim>(power);
64 }
65 if (EClass.rnd(4) == 0)
66 {
67 c.AddCondition<ConFear>(power);
68 }
69 if (EClass.rnd(1) == 0)
70 {
71 c.AddCondition<ConEuphoric>(power);
72 }
73 }
74 }
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9442
Definition: ConDim.cs:2
Definition: EClass.cs:6
static int rnd(long a)
Definition: EClass.cs:59
ElementContainer owner
Definition: ELEMENT.cs:271

References Chara.AddCondition(), Element.owner, and EClass.rnd().

Referenced by ActMoneyDump.Perform(), and Perform().

◆ Perform()

override bool ActMoneySlap.Perform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 16 of file ActMoneySlap.cs.

17 {
18 bool num = this is ActMoneyThrow;
19 int num2 = Mathf.Clamp(Act.CC.GetCurrency() / 100, 1, 20000000);
20 Thing thing = ThingGen.Create("money").SetNum(num2);
21 long dmg = (long)Mathf.Sqrt(num2) * GetPower(Act.CC) / 100;
22 Act.CC.ModCurrency(-num2);
23 if (!num)
24 {
25 Act.CC.PlaySound("whip");
26 }
27 Act.CC.PlaySound("money_dump");
29 if (num)
30 {
31 Act.CC.Say("throw", Act.CC, thing.GetName(NameStyle.Full));
32 Chara chara = Act.CC.host ?? Act.CC;
33 Effect.Get<EffectIRenderer>("throw").Play(chara, thing, chara.pos, Act.TP, 0.2f);
34 thing.renderer.SetFirst(first: false, chara.renderer.position);
35 }
36 else
37 {
39 Act.CC.Say("use_whip", Act.CC, Act.TC, thing.Name);
40 }
41 Act.TC.PlayAnime(AnimeID.Shiver);
42 Act.TC.DamageHP(dmg, 926, 100, AttackSource.Throw, Act.CC);
43 Act.TC.PlayEffect("hit_blunt").SetScale(1f);
44 Act.CC.PlaySound("hit_blunt");
46 {
49 }
50 return true;
51 }
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
NameStyle
Definition: NameStyle.cs:2
override int GetPower(Card c)
Definition: ABILITY.cs:338
static void MoneyEffect(Chara owner, Chara c, int power, int chance=5)
Definition: ActMoneySlap.cs:53
static Point TP
Definition: ACT.cs:81
void PlayAnime(AnimeID id, bool force)
Vector3 position
Definition: CardRenderer.cs:21
virtual void SetFirst(bool first, Vector3 pos)
virtual Chara Chara
Definition: Card.cs:2108
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6375
string Name
Definition: Card.cs:2177
bool ExistsOnMap
Definition: Card.cs:2123
Thing SetNum(int a)
Definition: Card.cs:3577
Point pos
Definition: Card.cs:60
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6409
void ModCurrency(int a, string id="money")
Definition: Card.cs:4043
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4149
virtual bool isChara
Definition: Card.cs:2121
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6394
CardRenderer renderer
Definition: Card.cs:62
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7052
Definition: Chara.cs:10
void OnInsulted()
Definition: Chara.cs:8357
override void LookAt(Card c)
Definition: Chara.cs:3592
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
Effect SetScale(float a)
Definition: Effect.cs:326
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:535

References Act.CC, Card.Chara, ThingGen.Create(), Card.DamageHP(), Card.ExistsOnMap, Effect.Get(), Card.GetCurrency(), Thing.GetName(), Ability.GetPower(), Card.isChara, Chara.LookAt(), Card.ModCurrency(), MoneyEffect(), Card.Name, Chara.OnInsulted(), CardRenderer.PlayAnime(), Card.PlayAnime(), Card.PlayEffect(), Card.PlaySound(), Card.pos, CardRenderer.position, Card.renderer, Card.Say(), CardRenderer.SetFirst(), Card.SetNum(), Effect.SetScale(), Act.TC, and Act.TP.

Property Documentation

◆ CanPressRepeat

override bool ActMoneySlap.CanPressRepeat
get

Definition at line 5 of file ActMoneySlap.cs.


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