Elin Decompiled Documentation EA 23.199 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)
 
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 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, 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 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 (long a)
 
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 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 ActThrow.cs.

Member Function Documentation

◆ CanPerform()

override bool ActThrow.CanPerform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 29 of file ActThrow.cs.

30 {
31 if (pcTarget != null && pcTarget.ExistsOnMap)
32 {
34 }
35 if (!Act.TP.IsHidden && !Act.TP.IsSky)
36 {
37 return Act.CC.CanSeeLos(Act.TP);
38 }
39 return false;
40 }
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:2047
Point pos
Definition: Card.cs:57
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1232
bool IsSky
Definition: Point.cs:212
Point Set(int _x, int _z)
Definition: Point.cs:491
bool IsHidden
Definition: Point.cs:335

References Chara.CanSeeLos(), Act.CC, Card.ExistsOnMap, Point.IsHidden, Point.IsSky, 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 64 of file ActThrow.cs.

65 {
66 if (t == null)
67 {
68 return false;
69 }
70 if (t.c_isImportant && !t.HasElement(410))
71 {
72 return false;
73 }
74 if (p == null && target != null && target.ExistsOnMap)
75 {
76 p = target.pos;
77 }
78 if (p == null)
79 {
80 return false;
81 }
82 if ((p.HasBlock && !p.cell.hasDoor && p.sourceBlock.tileType.IsBlockPass) || p.Equals(EClass.pc.pos) || t.trait.CanExtendBuild || t.trait.CanOnlyCarry)
83 {
84 return false;
85 }
87 {
89 if (card != null && card.IsPCFactionOrMinion)
90 {
91 return false;
92 }
93 }
94 return true;
95 }
Thing target
Definition: ActThrow.cs:5
Definition: Card.cs:11
bool HasElement(int ele, int req=1)
Definition: Card.cs:5725
Trait trait
Definition: Card.cs:51
bool c_isImportant
Definition: Card.cs:998
bool hasDoor
Definition: Cell.cs:258
override bool IsPC
Definition: Chara.cs:610
bool shiftToUseNegativeAbilityOnSelf
Definition: CoreConfig.cs:193
new GameConfig game
Definition: CoreConfig.cs:604
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:944
Card FindAttackTarget()
Definition: Point.cs:1082
bool HasBlock
Definition: Point.cs:141
Cell cell
Definition: Point.cs:51
virtual bool CanExtendBuild
Definition: Trait.cs:168
virtual bool CanOnlyCarry
Definition: Trait.cs:292

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)
19 {
20 TraitMonsterBall traitMonsterBall = target.trait as TraitMonsterBall;
21 if (pcTarget != null && traitMonsterBall != null && !traitMonsterBall.IsDuponneBall && !traitMonsterBall.IsLittleBall && pcTarget.LV > target.LV)
22 {
23 text = " " + "mb_invalidLV".lang();
24 }
25 }
26 return base.GetText(str) + text;
27 }
int LV
Definition: Card.cs:372
virtual bool IsDuponneBall
virtual bool IsLittleBall

References TraitMonsterBall.IsDuponneBall, TraitMonsterBall.IsLittleBall, Card.LV, pcTarget, and target.

◆ Perform()

override bool ActThrow.Perform ( )
inlinevirtual

Reimplemented from Act.

Definition at line 42 of file ActThrow.cs.

43 {
44 if (target == null)
45 {
46 target = Act.TC as Thing;
47 }
48 if (target == null || target.isDestroyed || target.GetRootCard() != Act.CC)
49 {
50 return false;
51 }
52 if (pcTarget != null)
53 {
55 {
56 return false;
57 }
59 }
61 return true;
62 }
bool isDestroyed
Definition: Card.cs:73
Thing Split(int a)
Definition: Card.cs:3382
Card GetRootCard()
Definition: Card.cs:3324
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 110 of file ActThrow.cs.

111 {
112 if (t.parent != EClass._zone && (!t.HasElement(410) || method == ThrowMethod.Punish))
113 {
115 }
116 Act.TP.Set(p);
117 Act.TC = target;
118 if (t.trait.ThrowType == ThrowType.Snow)
119 {
120 t.dir = EClass.rnd(2);
121 c.Talk("snow_throw");
122 if (EClass.rnd(2) == 0)
123 {
124 Act.TC = null;
125 }
126 }
127 c.Say("throw", c, t.GetName(NameStyle.Full, 1));
128 c.LookAt(p);
130 c.PlaySound("throw");
131 EffectIRenderer result = null;
132 if (c.isSynced || p.IsSync)
133 {
134 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);
135 t.renderer.SetFirst(first: false, c.renderer.position);
136 }
137 if (!t.HasElement(410) || method == ThrowMethod.Punish)
138 {
139 t._Move(p);
140 }
141 if (!t.trait.CanBeDestroyed)
142 {
143 c.PlaySound("miss");
144 return result;
145 }
146 ThrowType throwType = t.trait.ThrowType;
147 if ((uint)(throwType - 1) <= 1u)
148 {
149 Msg.Say("shatter");
150 }
151 bool flag = method == ThrowMethod.Reward;
152 bool flag2 = method == ThrowMethod.Default;
153 switch (t.trait.ThrowType)
154 {
155 case ThrowType.Explosive:
156 flag = true;
157 t.c_uidRefCard = c.uid;
158 t.Die(null, c, AttackSource.Throw);
159 break;
160 case ThrowType.Vase:
161 t.Die(null, null, AttackSource.Throw);
162 break;
163 case ThrowType.Potion:
164 flag = true;
165 if (Act.TC != null)
166 {
167 Act.TC.Say("throw_hit", t, Act.TC);
168 }
169 Act.TP.ModFire(-50, extinguish: true);
170 if (Act.TC != null && Act.TC.isChara)
171 {
172 if (t.trait.CanDrink(Act.TC.Chara))
173 {
174 t.trait.OnDrink(Act.TC.Chara);
175 }
176 flag2 = t.IsNegativeGift;
178 }
179 else
180 {
181 t.trait.OnThrowGround(c.Chara, Act.TP);
182 }
183 t.Die(null, null, AttackSource.Throw);
184 c.ModExp(108, 50);
185 break;
186 case ThrowType.Snow:
187 flag = true;
188 flag2 = false;
189 if (Act.TC != null && Act.TC.isChara)
190 {
191 Act.TC.Say("throw_hit", t, Act.TC);
192 if (EClass.rnd(2) == 0)
193 {
194 c.Talk("snow_hit");
195 }
197 t.Die(null, null, AttackSource.Throw);
198 c.ModExp(108, 50);
199 }
200 break;
201 case ThrowType.Ball:
202 flag = true;
203 flag2 = false;
204 if (Act.TC != null && Act.TC.isChara)
205 {
206 Act.TC.Say("throw_hit", t, Act.TC);
207 if (EClass.rnd(2) == 0)
208 {
209 c.Talk("snow_hit");
210 }
211 Act.TC.Say("ball_hit");
212 Act.TC.Chara?.Pick(t);
213 c.ModExp(108, 50);
214 }
215 break;
216 case ThrowType.Flyer:
217 flag = true;
218 flag2 = false;
219 if (Act.TC != null && Act.TC.isChara && c.isChara)
220 {
221 Act.TC.Say("throw_hit", t, Act.TC);
222 c.Chara.GiveGift(Act.TC.Chara, t);
223 c.ModExp(108, 50);
224 }
225 break;
226 case ThrowType.MonsterBall:
227 {
228 flag = true;
229 flag2 = false;
230 TraitMonsterBall traitMonsterBall = t.trait as TraitMonsterBall;
231 if (traitMonsterBall.chara != null)
232 {
233 if ((traitMonsterBall.IsLittleBall && !(EClass._zone is Zone_LittleGarden) && !EClass.game.IsSurvival) || (traitMonsterBall.IsDuponneBall && !(EClass._zone is Zone_Exile) && !EClass.game.IsSurvival))
234 {
235 break;
236 }
237 Chara _c = EClass._zone.AddCard(traitMonsterBall.chara, p).Chara;
238 if (_c.ai != null)
239 {
240 _c.ai.Cancel();
241 }
242 _c.enemy = null;
243 _c.PlayEffect("identify");
244 t.Die();
245 if (_c.IsMultisize)
246 {
247 _c.DestroyPath(_c.pos);
248 _c.ForeachPoint(delegate(Point p2, bool first)
249 {
250 foreach (Chara item in p2.ListCharas())
251 {
252 if (item != _c)
253 {
254 _c.Kick(p2, ignoreSelf: true, checkWall: false);
255 break;
256 }
257 }
258 });
259 }
260 if (traitMonsterBall.IsDuponneBall && _c.id == "lurie_boss")
261 {
262 _c.orgPos = c.pos.Copy();
263 _c.homeZone = EClass._zone;
264 Chara chara = _c;
265 Hostility c_originalHostility = (_c.hostility = Hostility.Friend);
266 chara.c_originalHostility = c_originalHostility;
268 _c.PlaySound("chime_angel");
269 }
270 else if (traitMonsterBall.IsLittleBall && _c.id == "littleOne")
271 {
272 _c.orgPos = c.pos.Copy();
273 Chara chara2 = _c;
274 Hostility c_originalHostility = (_c.hostility = Hostility.Neutral);
275 chara2.c_originalHostility = c_originalHostility;
277 _c.PlaySound("chime_angel");
278 EClass.core.actionsNextFrame.Add(delegate
279 {
280 _c.Talk("little_saved");
281 });
282 EClass.player.flags.little_saved = true;
284 }
285 else
286 {
287 _c.MakeAlly();
288 }
289 }
290 else
291 {
292 if (Act.TC == null || !Act.TC.isChara)
293 {
294 break;
295 }
296 Act.TC.Say("throw_hit", t, Act.TC);
297 Chara chara3 = Act.TC.Chara;
298 if (traitMonsterBall.IsDuponneBall)
299 {
300 if (chara3.id != "lurie_boss" || chara3.IsPCFactionOrMinion || EClass._zone is Zone_Exile || EClass._zone.IsUserZone)
301 {
302 Msg.Say("monsterball_invalid");
303 break;
304 }
305 }
306 else if (traitMonsterBall.IsLittleBall)
307 {
308 if (chara3.id != "littleOne" || chara3.IsPCFactionOrMinion || EClass._zone is Zone_LittleGarden || EClass._zone.IsUserZone)
309 {
310 Msg.Say("monsterball_invalid");
311 break;
312 }
313 }
314 else
315 {
316 if (!chara3.trait.CanBeTamed || EClass._zone.IsUserZone)
317 {
318 Msg.Say("monsterball_invalid");
319 break;
320 }
321 if (chara3.LV > traitMonsterBall.owner.LV)
322 {
323 Msg.Say("monsterball_lv");
324 break;
325 }
326 if (!EClass.debug.enable && chara3.hp > chara3.MaxHP / 10)
327 {
328 Msg.Say("monsterball_hp");
329 break;
330 }
331 }
332 Msg.Say("monsterball_capture", c, chara3);
333 chara3.PlaySound("identify");
334 chara3.PlayEffect("identify");
335 t.ChangeMaterial("copper");
336 if (chara3.IsLocalChara)
337 {
338 Debug.Log("Creating Replacement NPC for:" + chara3);
340 }
341 traitMonsterBall.chara = chara3;
342 chara3.ReleaseMinion();
343 EClass._zone.RemoveCard(chara3);
344 chara3.homeZone = null;
345 c.ModExp(108, 100);
346 if (traitMonsterBall.IsDuponneBall && EClass.game.quests.GetPhase<QuestNegotiationDarkness>() == 3)
347 {
349 }
350 }
351 break;
352 }
353 }
354 if (t.trait is TraitDye)
355 {
356 t.trait.OnThrowGround(c.Chara, Act.TP);
357 }
358 if (!flag && Act.TC != null)
359 {
360 AttackProcess.Current.Prepare(c.Chara, t, Act.TC, Act.TP, 0, _isThrow: true);
361 if (method == ThrowMethod.Punish && t.rarity >= Rarity.Legendary)
362 {
363 AttackProcess.Current.critFury = true;
364 }
365 if (AttackProcess.Current.Perform(0, hasHit: false))
366 {
367 if (Act.TC.IsAliveInCurrentZone && t.trait is TraitErohon && Act.TC.id == t.c_idRefName)
368 {
370 }
371 if (!t.isDestroyed && t.trait.CanBeDestroyed && !t.IsFurniture && !t.category.IsChildOf("instrument") && !t.IsUnique && !t.HasElement(410))
372 {
373 t.Destroy();
374 }
375 }
376 else
377 {
378 c.PlaySound("miss");
379 }
380 }
381 if (EClass.rnd(2) == 0)
382 {
383 c.Chara.RemoveCondition<ConInvisibility>();
384 }
385 if (Act.TC != null)
386 {
387 if (flag2)
388 {
390 }
392 {
393 c.Chara.stamina.Mod(-1);
394 }
395 }
396 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)
397 {
399 {
400 target = Act.TC,
401 throwItem = t
402 });
403 }
404 return result;
405 }
AttackSource
Definition: AttackSource.cs:2
Hostility
Definition: Hostility.cs:2
NameStyle
Definition: NameStyle.cs:2
Rarity
Definition: Rarity.cs:2
ThrowMethod
Definition: ThrowMethod.cs:2
ThrowType
Definition: ThrowType.cs:2
virtual Status Cancel()
Definition: AIAct.cs:291
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()
bool IsPCFactionOrMinion
Definition: Card.cs:2234
virtual Chara Chara
Definition: Card.cs:2032
string id
Definition: Card.cs:33
bool IsRestrainedResident
Definition: Card.cs:2220
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5939
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6489
int hp
Definition: Card.cs:228
ICardParent parent
Definition: Card.cs:53
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:7569
virtual void LookAt(Card c)
Definition: Card.cs:6006
int uid
Definition: Card.cs:120
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5973
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2089
virtual bool isChara
Definition: Card.cs:2045
void ModExp(string alias, int a)
Definition: Card.cs:2610
CardRenderer renderer
Definition: Card.cs:59
void KillAnime()
Definition: Card.cs:5953
virtual bool isSynced
Definition: Card.cs:2049
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6586
Definition: Chara.cs:10
new TraitChara trait
Definition: Chara.cs:501
AIAct ai
Definition: Chara.cs:200
Chara CreateReplacement()
Definition: Chara.cs:7712
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:8897
Chara host
Definition: Chara.cs:33
void ReleaseMinion()
Definition: Chara.cs:2309
AIAct SetAI(AIAct g)
Definition: Chara.cs:8527
void DestroyPath(Point pos)
Definition: Chara.cs:3118
override int MaxHP
Definition: Chara.cs:706
void Kick(Point p, bool ignoreSelf=false, bool checkWall=true)
Definition: Chara.cs:5557
void MakeAlly(bool msg=true)
Definition: Chara.cs:2232
Stats stamina
Definition: Chara.cs:1128
bool IsLocalChara
Definition: Chara.cs:839
void GiveGift(Chara c, Thing t)
Definition: Chara.cs:7934
override bool IsMultisize
Definition: Chara.cs:704
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6121
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:4204
void OnGiveErohon(Thing t)
Definition: Chara.cs:8056
Definition: ConWet.cs:2
bool enable
Definition: CoreDebug.cs:286
static Game game
Definition: EClass.cs:8
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static int rnd(long a)
Definition: EClass.cs:58
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
bool IsSurvival
Definition: Game.cs:272
QuestManager quests
Definition: Game.cs:179
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:888
Definition: Point.cs:9
Point Copy()
Definition: Point.cs:479
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:917
bool IsSync
Definition: Point.cs:332
List< Chara > ListCharas()
Definition: Point.cs:1155
Quest Get(string id)
virtual void Mod(int a)
Definition: Stats.cs:135
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:527
virtual bool CanBeTamed
Definition: TraitChara.cs:102
virtual bool CanBeAttacked
Definition: Trait.cs:164
Card owner
Definition: Trait.cs:27
virtual ThrowType ThrowType
Definition: Trait.cs:248
virtual bool IsUserZone
Definition: Zone.cs:266
void RemoveCard(Card t)
Definition: Zone.cs:1983
void ModInfluence(int a)
Definition: Zone.cs:3462
Card AddCard(Card t, Point point)
Definition: Zone.cs:1943

References EClass._map, Card._Move(), EClass._zone, BaseCore.actionsNextFrame, Zone.AddCard(), Chara.AddCondition(), Chara.ai, Card.c_idRefName, Trait.CanBeAttacked, Trait.CanBeDestroyed, TraitChara.CanBeTamed, AIAct.Cancel(), 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(), Chara.DestroyPath(), Card.Die(), Chara.DoHostileAction(), CoreDebug.enable, Card.ForeachPoint(), EClass.game, Effect.Get(), QuestManager.Get(), Thing.GetName(), Chara.GiveGift(), Card.HasElement(), Chara.host, Card.hp, Card.id, Card.IsAliveInCurrentZone, Card.isChara, Card.isDestroyed, TraitMonsterBall.IsDuponneBall, Card.IsFurniture, TraitMonsterBall.IsLittleBall, Chara.IsLocalChara, Chara.IsMultisize, Card.IsNegativeGift, Card.IsPCFactionOrMinion, Card.IsRestrainedResident, Game.IsSurvival, Point.IsSync, Card.isSynced, Card.IsUnique, Zone.IsUserZone, item, Chara.Kick(), Card.KillAnime(), Point.ListCharas(), 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(), Game.quests, Card.rarity, Chara.ReleaseMinion(), 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 97 of file ActThrow.cs.

98 {
99 if (failChance > EClass.rndf(1f))
100 {
101 Point randomPoint = p.GetRandomPoint(1);
102 if (randomPoint != null && !randomPoint.Equals(c.pos))
103 {
104 p = randomPoint;
105 }
106 }
107 return Throw(c, p, p.FindAttackTarget(), t, method);
108 }
static float rndf(float a)
Definition: EClass.cs:92
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:757

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: