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

Public Member Functions

override string GetText (string str="")
 
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)
 

Static Public Member Functions

static bool CanThrow (Chara c, Thing t, Card target, Point p=null)
 
static EffectIRenderer Throw (Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
 
static EffectIRenderer Throw (Card c, Point p, Card target, Thing t, ThrowMethod method=ThrowMethod.Default)
 
- 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)
 

Public Attributes

Thing target
 
Chara pcTarget
 
- 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 bool CanPressRepeat [get]
 
override TargetType TargetType [get]
 
override int PerformDistance [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 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 ActThrow.cs.

Member Function Documentation

◆ CanPerform()

override bool ActThrow.CanPerform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 25 of file ActThrow.cs.

26 {
27 if (pcTarget != null && pcTarget.ExistsOnMap)
28 {
30 }
31 if (!Act.TP.IsHidden)
32 {
33 return Act.CC.CanSeeLos(Act.TP);
34 }
35 return false;
36 }
Chara pcTarget
Definition: ActThrow.cs:7
Definition: ACT.cs:62
static Point TP
Definition: ACT.cs:81
static Chara CC
Definition: ACT.cs:77
bool ExistsOnMap
Definition: Card.cs:1961
Point pos
Definition: Card.cs:55
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1059
Point Set(int _x, int _z)
Definition: Point.cs:479
bool IsHidden
Definition: Point.cs:323

References Chara.CanSeeLos(), Act.CC, Card.ExistsOnMap, Point.IsHidden, pcTarget, Card.pos, Point.Set(), and Act.TP.

Referenced by GoalCombat.TryThrow().

◆ CanThrow()

static bool ActThrow.CanThrow ( Chara  c,
Thing  t,
Card  target,
Point  p = null 
)
inlinestatic

Definition at line 60 of file ActThrow.cs.

61 {
62 if (t == null)
63 {
64 return false;
65 }
66 if (t.c_isImportant && !t.HasElement(410))
67 {
68 return false;
69 }
70 if (p == null && target != null && target.ExistsOnMap)
71 {
72 p = target.pos;
73 }
74 if (p == null)
75 {
76 return false;
77 }
78 if ((p.HasBlock && !p.cell.hasDoor && p.sourceBlock.tileType.IsBlockPass) || p.Equals(EClass.pc.pos) || t.trait.CanExtendBuild || t.trait.CanOnlyCarry)
79 {
80 return false;
81 }
83 {
85 if (card != null && card.IsPCFactionOrMinion)
86 {
87 return false;
88 }
89 }
90 return true;
91 }
Thing target
Definition: ActThrow.cs:5
Definition: Card.cs:11
bool HasElement(int ele, int req=1)
Definition: Card.cs:5214
Trait trait
Definition: Card.cs:49
bool c_isImportant
Definition: Card.cs:984
bool hasDoor
Definition: Cell.cs:258
override bool IsPC
Definition: Chara.cs:597
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 Chara pc
Definition: EClass.cs:14
Definition: EInput.cs:8
static bool isShiftDown
Definition: EInput.cs:261
SourceBlock.Row sourceBlock
Definition: Point.cs:63
bool Equals(int _x, int _z)
Definition: Point.cs:924
Card FindAttackTarget()
Definition: Point.cs:1062
bool HasBlock
Definition: Point.cs:141
Cell cell
Definition: Point.cs:51
virtual bool CanExtendBuild
Definition: Trait.cs:161
virtual bool CanOnlyCarry
Definition: Trait.cs:283

References Card.c_isImportant, Trait.CanExtendBuild, Trait.CanOnlyCarry, card, Core.config, EClass.core, Card.ExistsOnMap, CoreConfig.game, Card.HasElement(), Chara.IsPC, EInput.isShiftDown, EClass.pc, Card.pos, CoreConfig.GameConfig.shiftToUseNegativeAbilityOnSelf, target, and Card.trait.

Referenced by AM_Adv._OnUpdateInput(), AI_PracticeDummy.CreateProgress(), HotItemHeld.TrySetAct(), and HotItemHeld.TrySetToolAct().

◆ GetText()

override string ActThrow.GetText ( string  str = "")
inlinevirtual

Reimplemented from Act.

Definition at line 15 of file ActThrow.cs.

16 {
17 string text = "";
18 if (target != null && pcTarget != null && target.trait is TraitMonsterBall && pcTarget.LV > target.LV)
19 {
20 text = " " + "mb_invalidLV".lang();
21 }
22 return base.GetText(str) + text;
23 }
int LV
Definition: Card.cs:370

References Card.LV, pcTarget, target, and Card.trait.

◆ Perform()

override bool ActThrow.Perform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 38 of file ActThrow.cs.

39 {
40 if (target == null)
41 {
42 target = Act.TC as Thing;
43 }
44 if (target == null || target.isDestroyed || target.GetRootCard() != Act.CC)
45 {
46 return false;
47 }
48 if (pcTarget != null)
49 {
51 {
52 return false;
53 }
55 }
57 return true;
58 }
bool isDestroyed
Definition: Card.cs:71
Thing Split(int a)
Definition: Card.cs:3231
Card GetRootCard()
Definition: Card.cs:3173
Definition: Thing.cs:8

References Act.CC, Card.ExistsOnMap, Card.GetRootCard(), Card.HasElement(), Card.isDestroyed, pcTarget, Card.pos, Point.Set(), Card.Split(), target, Throw, and Act.TP.

Referenced by AM_Adv._OnUpdateInput().

◆ Throw() [1/2]

static EffectIRenderer ActThrow.Throw ( Card  c,
Point  p,
Card  target,
Thing  t,
ThrowMethod  method = ThrowMethod::Default 
)
inlinestatic

Definition at line 106 of file ActThrow.cs.

107 {
108 if (t.parent != EClass._zone && !t.HasElement(410))
109 {
111 }
112 Act.TP.Set(p);
113 Act.TC = target;
114 if (t.trait.ThrowType == ThrowType.Snow)
115 {
116 t.dir = EClass.rnd(2);
117 c.Talk("snow_throw");
118 if (EClass.rnd(2) == 0)
119 {
120 Act.TC = null;
121 }
122 }
123 c.Say("throw", c, t.GetName(NameStyle.Full, 1));
124 c.LookAt(p);
126 c.PlaySound("throw");
127 EffectIRenderer result = null;
128 if (c.isSynced || p.IsSync)
129 {
130 result = Effect.Get<EffectIRenderer>((t.trait is TraitBall) ? "throw_ball" : "throw").Play((c.isChara && c.Chara.host != null) ? c.Chara.host : c, t, c.pos, p, 0.2f);
131 t.renderer.SetFirst(first: false, c.renderer.position);
132 }
133 if (!t.HasElement(410))
134 {
135 t._Move(p);
136 }
137 if (!t.trait.CanBeDestroyed)
138 {
139 c.PlaySound("miss");
140 return result;
141 }
142 ThrowType throwType = t.trait.ThrowType;
143 if ((uint)(throwType - 1) <= 1u)
144 {
145 Msg.Say("shatter");
146 }
147 bool flag = method == ThrowMethod.Reward;
148 bool flag2 = method == ThrowMethod.Default;
149 switch (t.trait.ThrowType)
150 {
151 case ThrowType.Explosive:
152 flag = true;
153 t.c_uidRefCard = c.uid;
154 t.Die(null, c, AttackSource.Throw);
155 break;
156 case ThrowType.Vase:
157 t.Die(null, null, AttackSource.Throw);
158 break;
159 case ThrowType.Potion:
160 flag = true;
161 if (Act.TC != null)
162 {
163 Act.TC.Say("throw_hit", t, Act.TC);
164 }
165 Act.TP.ModFire(-50, extinguish: true);
166 if (Act.TC != null && Act.TC.isChara)
167 {
168 if (t.trait.CanDrink(Act.TC.Chara))
169 {
170 t.trait.OnDrink(Act.TC.Chara);
171 }
172 flag2 = t.IsNegativeGift;
174 }
175 else
176 {
177 t.trait.OnThrowGround(c.Chara, Act.TP);
178 }
179 t.Die(null, null, AttackSource.Throw);
180 c.ModExp(108, 50);
181 break;
182 case ThrowType.Snow:
183 flag = true;
184 flag2 = false;
185 if (Act.TC != null && Act.TC.isChara)
186 {
187 Act.TC.Say("throw_hit", t, Act.TC);
188 if (EClass.rnd(2) == 0)
189 {
190 c.Talk("snow_hit");
191 }
193 t.Die(null, null, AttackSource.Throw);
194 c.ModExp(108, 50);
195 }
196 break;
197 case ThrowType.Ball:
198 flag = true;
199 flag2 = false;
200 if (Act.TC != null && Act.TC.isChara)
201 {
202 Act.TC.Say("throw_hit", t, Act.TC);
203 if (EClass.rnd(2) == 0)
204 {
205 c.Talk("snow_hit");
206 }
207 Act.TC.Say("ball_hit");
208 Act.TC.Chara?.Pick(t);
209 c.ModExp(108, 50);
210 }
211 break;
212 case ThrowType.Flyer:
213 flag = true;
214 flag2 = false;
215 if (Act.TC != null && Act.TC.isChara && c.isChara)
216 {
217 Act.TC.Say("throw_hit", t, Act.TC);
218 c.Chara.GiveGift(Act.TC.Chara, t);
219 c.ModExp(108, 50);
220 }
221 break;
222 case ThrowType.MonsterBall:
223 {
224 flag = true;
225 flag2 = false;
226 TraitMonsterBall traitMonsterBall = t.trait as TraitMonsterBall;
227 if (traitMonsterBall.chara != null)
228 {
229 if (traitMonsterBall.IsLittleBall && !(EClass._zone is Zone_LittleGarden))
230 {
231 break;
232 }
233 Chara _c = EClass._zone.AddCard(traitMonsterBall.chara, p).Chara;
234 _c.PlayEffect("identify");
235 t.Die();
236 if (traitMonsterBall.IsLittleBall && _c.id == "littleOne")
237 {
238 _c.orgPos = c.pos.Copy();
239 Chara chara = _c;
240 Hostility c_originalHostility = (_c.hostility = Hostility.Neutral);
241 chara.c_originalHostility = c_originalHostility;
243 _c.PlaySound("chime_angel");
244 EClass.core.actionsNextFrame.Add(delegate
245 {
246 _c.Talk("little_saved");
247 });
248 EClass.player.flags.little_saved = true;
250 }
251 else
252 {
253 _c.MakeAlly();
254 }
255 }
256 else
257 {
258 if (Act.TC == null || !Act.TC.isChara)
259 {
260 break;
261 }
262 Act.TC.Say("throw_hit", t, Act.TC);
263 Chara chara2 = Act.TC.Chara;
264 if (traitMonsterBall.IsLittleBall)
265 {
266 if (chara2.id != "littleOne" || EClass._zone is Zone_LittleGarden || EClass._zone.IsUserZone)
267 {
268 Msg.Say("monsterball_invalid");
269 break;
270 }
271 }
272 else
273 {
274 if (!chara2.trait.CanBeTamed || EClass._zone.IsUserZone)
275 {
276 Msg.Say("monsterball_invalid");
277 break;
278 }
279 if (chara2.LV > traitMonsterBall.owner.LV)
280 {
281 Msg.Say("monsterball_lv");
282 break;
283 }
284 if (!EClass.debug.enable && chara2.hp > chara2.MaxHP / 10)
285 {
286 Msg.Say("monsterball_hp");
287 break;
288 }
289 }
290 Msg.Say("monsterball_capture", c, chara2);
291 chara2.PlaySound("identify");
292 chara2.PlayEffect("identify");
293 t.ChangeMaterial("copper");
294 if (chara2.IsLocalChara)
295 {
296 Debug.Log("Creating Replacement NPC for:" + chara2);
298 }
299 traitMonsterBall.chara = chara2;
300 EClass._zone.RemoveCard(chara2);
301 chara2.homeZone = null;
302 c.ModExp(108, 100);
303 }
304 break;
305 }
306 }
307 if (t.trait is TraitDye)
308 {
309 t.trait.OnThrowGround(c.Chara, Act.TP);
310 }
311 if (!flag && Act.TC != null)
312 {
313 AttackProcess.Current.Prepare(c.Chara, t, Act.TC, Act.TP, 0, _isThrow: true);
314 if (AttackProcess.Current.Perform(0, hasHit: false))
315 {
316 if (Act.TC.IsAliveInCurrentZone && t.trait is TraitErohon && Act.TC.id == t.c_idRefName)
317 {
319 }
320 if (!t.isDestroyed && t.trait.CanBeDestroyed && !t.IsFurniture && !t.category.IsChildOf("instrument") && !t.IsUnique && !t.HasElement(410))
321 {
322 t.Destroy();
323 }
324 }
325 else
326 {
327 c.PlaySound("miss");
328 }
329 }
330 if (EClass.rnd(2) == 0)
331 {
332 c.Chara.RemoveCondition<ConInvisibility>();
333 }
334 if (Act.TC != null)
335 {
336 if (flag2)
337 {
339 }
341 {
342 c.Chara.stamina.Mod(-1);
343 }
344 }
345 if (t.HasElement(410) && Act.TC != null && Act.CC == EClass.pc && !(Act.CC.ai is AI_PracticeDummy) && (Act.TC.trait is TraitTrainingDummy || Act.TC.IsRestrainedResident) && Act.CC.stamina.value > 0)
346 {
348 {
349 target = Act.TC,
350 throwItem = t
351 });
352 }
353 return result;
354 }
AttackSource
Definition: AttackSource.cs:2
Hostility
Definition: Hostility.cs:2
NameStyle
Definition: NameStyle.cs:2
ThrowMethod
Definition: ThrowMethod.cs:2
ThrowType
Definition: ThrowType.cs:2
static Card TC
Definition: ACT.cs:79
void Prepare(Chara _CC, Thing _weapon, Card _TC=null, Point _TP=null, int _attackIndex=0, bool _isThrow=false)
bool Perform(int count, bool hasHit, float dmgMulti=1f, bool maxRoll=false, bool subAttack=false)
static AttackProcess Current
Definition: AttackProcess.cs:8
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
Vector3 position
Definition: CardRenderer.cs:21
virtual void NextFrame()
virtual Chara Chara
Definition: Card.cs:1946
string id
Definition: Card.cs:31
bool IsRestrainedResident
Definition: Card.cs:2118
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
int hp
Definition: Card.cs:226
ICardParent parent
Definition: Card.cs:51
virtual void LookAt(Card c)
Definition: Card.cs:5471
int uid
Definition: Card.cs:118
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5438
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2003
virtual bool isChara
Definition: Card.cs:1959
void ModExp(string alias, int a)
Definition: Card.cs:2508
CardRenderer renderer
Definition: Card.cs:57
void KillAnime()
Definition: Card.cs:5418
virtual bool isSynced
Definition: Card.cs:1963
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
Definition: Chara.cs:10
new TraitChara trait
Definition: Chara.cs:488
Chara CreateReplacement()
Definition: Chara.cs:7233
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:8415
Chara host
Definition: Chara.cs:33
AIAct SetAI(AIAct g)
Definition: Chara.cs:8045
override int MaxHP
Definition: Chara.cs:693
void MakeAlly(bool msg=true)
Definition: Chara.cs:2004
Stats stamina
Definition: Chara.cs:955
bool IsLocalChara
Definition: Chara.cs:794
void GiveGift(Chara c, Thing t)
Definition: Chara.cs:7480
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:5707
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:3920
void OnGiveErohon(Thing t)
Definition: Chara.cs:7602
Definition: ConWet.cs:2
bool enable
Definition: CoreDebug.cs:285
static int rnd(int a)
Definition: EClass.cs:50
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static Player player
Definition: EClass.cs:12
static CoreDebug debug
Definition: EClass.cs:48
EffectIRenderer Play(Card _card, Card _origin, Vector3 _to)
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
List< Chara > deadCharas
Definition: Map.cs:46
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
int little_saved
Definition: Player.cs:736
Point Copy()
Definition: Point.cs:467
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:897
bool IsSync
Definition: Point.cs:320
virtual void Mod(int a)
Definition: Stats.cs:135
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:494
virtual bool CanBeTamed
Definition: TraitChara.cs:104
virtual bool IsLittleBall
virtual bool CanBeAttacked
Definition: Trait.cs:159
Card owner
Definition: Trait.cs:26
virtual ThrowType ThrowType
Definition: Trait.cs:241
virtual bool IsUserZone
Definition: Zone.cs:264
void RemoveCard(Card t)
Definition: Zone.cs:1933
void ModInfluence(int a)
Definition: Zone.cs:3301
Card AddCard(Card t, Point point)
Definition: Zone.cs:1893

References EClass._map, Card._Move(), EClass._zone, BaseCore.actionsNextFrame, Zone.AddCard(), Chara.AddCondition(), Card.c_idRefName, Trait.CanBeAttacked, Trait.CanBeDestroyed, TraitChara.CanBeTamed, Trait.CanDrink(), Card.category, Act.CC, Card.ChangeMaterial(), Card.Chara, TraitMonsterBall.chara, Point.Copy(), EClass.core, Chara.CreateReplacement(), AttackProcess.Current, Map.deadCharas, EClass.debug, Debug, Card.Destroy(), Card.Die(), Chara.DoHostileAction(), CoreDebug.enable, Effect.Get(), Thing.GetName(), Chara.GiveGift(), Card.HasElement(), Chara.host, Card.hp, Card.id, Card.IsAliveInCurrentZone, Card.isChara, Card.isDestroyed, Card.IsFurniture, TraitMonsterBall.IsLittleBall, Chara.IsLocalChara, Card.IsNegativeGift, Card.IsRestrainedResident, Point.IsSync, Card.isSynced, Zone.IsUserZone, Card.KillAnime(), Player.little_saved, Card.LookAt(), Card.LV, Chara.MakeAlly(), Chara.MaxHP, Stats.Mod(), Card.ModExp(), Point.ModFire(), Zone.ModInfluence(), CardRenderer.NextFrame(), Trait.OnDrink(), Chara.OnGiveErohon(), Trait.OnThrowGround(), Trait.owner, Card.parent, AttackProcess.Perform(), Chara.Pick(), EffectIRenderer.Play(), Card.PlayEffect(), EClass.player, Card.PlaySound(), Card.pos, CardRenderer.position, AttackProcess.Prepare(), Zone.RemoveCard(), Card.renderer, EClass.rnd(), Msg.Say(), Card.Say(), Point.Set(), Chara.SetAI(), Chara.stamina, Card.Talk(), target, Act.TC, Trait.ThrowType, Act.TP, Card.trait, Chara.trait, and Card.uid.

◆ Throw() [2/2]

static EffectIRenderer ActThrow.Throw ( Card  c,
Point  p,
Thing  t,
ThrowMethod  method = ThrowMethod::Default,
float  failChance = 0f 
)
inlinestatic

Definition at line 93 of file ActThrow.cs.

94 {
95 if (failChance > EClass.rndf(1f))
96 {
97 Point randomPoint = p.GetRandomPoint(1);
98 if (randomPoint != null && !randomPoint.Equals(c.pos))
99 {
100 p = randomPoint;
101 }
102 }
103 return Throw(c, p, p.FindAttackTarget(), t, method);
104 }
static float rndf(float a)
Definition: EClass.cs:79
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 Point.Equals(), Point.FindAttackTarget(), Point.GetRandomPoint(), Card.pos, EClass.rndf(), and Throw.

Referenced by AI_PracticeDummy.CreateProgress(), Chara.DoHostileAction(), ActEffect.Proc(), AI_Idle.Run(), AI_PlayMusic.ThrowReward(), and GoalCombat.TryThrow().

Member Data Documentation

◆ pcTarget

Chara ActThrow.pcTarget

Definition at line 7 of file ActThrow.cs.

Referenced by CanPerform(), GetText(), and Perform().

◆ target

Thing ActThrow.target

Definition at line 5 of file ActThrow.cs.

Referenced by CanThrow(), GetText(), ActRanged.Perform(), Perform(), and Throw().

Property Documentation

◆ CanPressRepeat

override bool ActThrow.CanPressRepeat
get

Definition at line 9 of file ActThrow.cs.

◆ PerformDistance

override int ActThrow.PerformDistance
get

Definition at line 13 of file ActThrow.cs.

◆ TargetType

override TargetType ActThrow.TargetType
get

Definition at line 11 of file ActThrow.cs.


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