Elin Decompiled Documentation EA 23.244 Nightly
Loading...
Searching...
No Matches
ActMelee Class Reference
Inheritance diagram for ActMelee:
ActBaseAttack Act Element EClass ActMeleeBladeStorm ActMeleeCounter ActMeleeParry ActMeleeSwarm ActMeleeWhilrwind ActRush

Public Member Functions

bool HideHint (Card c)
 
override string GetHintText (string str="")
 
override string GetTextSmall (Card c)
 
override CursorInfo GetCursorIcon (Card c)
 
override bool ShowMouseHint (Card c)
 
override bool CanPerform ()
 
override bool Perform ()
 
bool Attack (float dmgMulti=1f)
 
- 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 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)
 
virtual bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
virtual void WritePurchaseReq (UINote n, int lv=1)
 

Properties

virtual bool AllowCounter [get]
 
virtual bool AllowParry [get]
 
virtual bool ShouldRollMax [get]
 
virtual float BaseDmgMTP [get]
 
virtual bool UseWeaponDist [get]
 
override int PerformDistance [get]
 
override bool ResetAxis [get]
 
override bool CanPressRepeat [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 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 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)
 
- 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 4 of file ActMelee.cs.

Member Function Documentation

◆ Attack()

bool ActMelee.Attack ( float  dmgMulti = 1f)
inline

Definition at line 105 of file ActMelee.cs.

106 {
107 Act.CC.combatCount = 10;
108 Act.CC.LookAt(Act.TC);
110 if (Act.CC.HasCondition<ConFear>())
111 {
112 Act.CC.Say("fear", Act.CC, Act.TC);
113 if (Act.CC.IsPC)
114 {
115 EInput.Consume(consumeAxis: true);
116 }
117 return true;
118 }
120 bool intercepted = (Act.TC?.Chara?.RequestProtection(Act.CC, delegate(Chara c)
121 {
122 Act.TC = c;
123 })).GetValueOrDefault();
124 Act.TP.Set(Act.TC.pos);
125 CellEffect effect = Act.TP.cell.effect;
126 if (effect != null && effect.id == 6 && EClass.rnd(2) == 0)
127 {
128 Act.CC.PlaySound("miss");
129 Act.CC.Say("abMistOfDarkness_miss", Act.CC);
130 return true;
131 }
132 bool hasHit = false;
133 bool hasMissed = false;
134 bool usedWeapon = false;
135 bool usedTalisman = false;
136 bool maxRoll = ShouldRollMax;
137 int count = 0;
138 int dist = Act.CC.Dist(Act.TC);
139 Point orgPos = Act.TC.pos.Copy();
140 Chara cC = Act.CC;
141 Card orgTC = Act.TC;
143 bool parried = false;
144 foreach (BodySlot slot in Act.CC.body.slots)
145 {
146 _Attack(slot);
147 if (parried)
148 {
149 break;
150 }
151 }
152 if (!usedWeapon)
153 {
154 _Attack(null);
155 }
157 {
158 EClass.Wait(0.25f, Act.CC);
159 }
160 if (EClass.rnd(2) == 0)
161 {
162 Act.CC.RemoveCondition<ConInvisibility>();
163 Act.CC.RemoveCondition<ConDark>();
164 }
165 if (orgTC.isChara && orgTC.ExistsOnMap && orgTC != cC && !orgTC.IsRestrainedResident && !orgTC.IsDisabled && ACT.Melee.CanPerform(orgTC.Chara, cC) && (!orgTC.IsPCFactionOrMinion || !EClass._zone.isPeace))
166 {
167 if (parried)
168 {
169 new ActMeleeParry().Perform(orgTC.Chara, cC);
170 }
171 else if (AllowCounter && hasMissed && !cC.HasElement(439) && orgTC.HasElement(380))
172 {
173 orgTC.Say((orgTC.isChara && orgTC.Chara.IsHostile()) ? "counter_enemy" : "counter");
174 new ActMeleeCounter().Perform(orgTC.Chara, cC);
175 }
176 }
177 Act.TC = orgTC;
178 Act.CC = cC;
179 if (!hasHit)
180 {
181 Act.CC.PlaySound("miss");
182 }
183 return true;
184 void _Attack(BodySlot slot)
185 {
186 Act.TC = orgTC;
187 Act.TP = orgPos;
188 Thing w;
189 int splash;
190 int chaser;
191 int flurry;
192 int frustration;
193 int feint;
194 int knockback;
195 int mod_talisman;
196 if (Act.TC != null && Act.TC.IsAliveInCurrentZone)
197 {
198 w = null;
199 if (slot != null)
200 {
201 if (slot.thing == null || slot.elementId != 35 || slot.thing.source.offense.Length < 2)
202 {
203 return;
204 }
205 w = slot.thing;
206 }
207 int num = 1 + Mathf.Max(Act.CC.Evalue(666), (w != null) ? w.Evalue(666) : 0);
208 if (!UseWeaponDist || dist <= 1 || dist <= num || intercepted)
209 {
210 int num2 = GetWeaponEnc(606, addSelfEnc: false);
211 int scatter = GetWeaponEnc(607, addSelfEnc: false);
212 splash = GetWeaponEnc(608, addSelfEnc: true);
213 chaser = GetWeaponEnc(620, addSelfEnc: true);
214 flurry = GetWeaponEnc(621, addSelfEnc: true);
215 frustration = GetWeaponEnc(624, addSelfEnc: true);
216 int num3 = GetWeaponEnc(622, addSelfEnc: true);
217 feint = GetWeaponEnc(623, addSelfEnc: true);
218 knockback = Act.CC.Evalue(603);
219 mod_talisman = GetWeaponEnc(609, addSelfEnc: true);
220 List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1);
221 if (w != null)
222 {
223 if (safety)
224 {
225 if (!w.HasElement(486))
226 {
227 return;
228 }
229 num2 = (scatter = (splash = (num3 = 0)));
230 }
231 usedWeapon = true;
232 if (w.IsMeleeWithAmmo && Act.CC.IsPC && w.c_ammo <= 0 && !Act.CC.HasCondition<ConReload>())
233 {
235 }
236 }
237 AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false);
238 if (!parried)
239 {
240 if (num2 > 0)
241 {
242 foreach (Point item in list2)
243 {
244 if (!item.Equals(orgPos))
245 {
246 Chara firstChara = item.FirstChara;
247 if (firstChara != null && firstChara.IsHostile(Act.CC))
248 {
249 AttackWithFlurry(firstChara, item, 1f, subAttack: false);
250 }
251 }
252 }
253 }
254 else if (scatter > 0)
255 {
256 Act.TP.ForeachNeighbor(delegate(Point p)
257 {
258 if (!p.Equals(orgPos))
259 {
260 Chara firstChara2 = p.FirstChara;
261 if (firstChara2 != null && firstChara2.IsHostile(Act.CC))
262 {
263 AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true);
264 }
265 }
266 });
267 }
268 else if (num3 > 0)
269 {
270 List<Point> list = new List<Point>();
271 Act.TP.ForeachNeighbor(delegate(Point p)
272 {
273 if (!p.Equals(Act.TP))
274 {
275 list.Add(p.Copy());
276 }
277 });
278 list.Shuffle();
279 int num4 = 0;
280 for (int i = 0; i < 9 && num3 > EClass.rnd(10 + (int)Mathf.Pow(3f, i + 2)); i++)
281 {
282 num4++;
283 }
284 foreach (Point item2 in list)
285 {
286 foreach (Card item3 in item2.ListCards().Copy())
287 {
288 if (num4 <= 0 || !Act.CC.IsAliveInCurrentZone)
289 {
290 break;
291 }
292 if (item3.trait.CanBeAttacked || (item3.isChara && item3.Chara.IsHostile(Act.CC)))
293 {
294 AttackWithFlurry(item3, item2, 1f, subAttack: true);
295 if (parried)
296 {
297 break;
298 }
299 num4--;
300 }
301 }
302 }
303 }
304 }
305 count++;
306 }
307 }
308 void Attack(Card _tc, Point _tp, float mtp, bool subAttack)
309 {
310 Act.TC = _tc;
311 Act.TP = _tp;
314 {
315 int num5 = Act.TC.Evalue(437);
316 if (num5 > 0 && !Act.CC.HasElement(439))
317 {
318 int num6 = EClass.curve(5 + num5 / 3, 10, 3, 70);
319 int ele2 = 123;
320 int num7 = Act.TC.Evalue(ele2);
321 if (Act.TC.isChara)
322 {
323 num6 += Act.TC.Evalue(1750) * 2 * ((Act.TC.Chara.body.GetAttackStyle() != AttackStyle.Shield) ? 1 : 2);
324 foreach (BodySlot slot2 in Act.TC.Chara.body.slots)
325 {
326 if (slot2.thing != null && slot2.thing.HasElement(437) && Act.TC.Evalue(slot2.thing.category.skill) > num7)
327 {
328 ele2 = slot2.thing.category.skill;
329 num7 = Act.TC.Evalue(ele2);
330 }
331 }
332 }
333 num6 = num6 * 100 / (int)Mathf.Clamp((float)AttackProcess.Current.weaponSkill.Value / (float)num7 * 100f, 50f, 150f);
334 if (EClass.rnd(100) < num6)
335 {
336 Act.TC.Say((Act.TC.isChara && Act.TC.Chara.IsHostile()) ? "parry_enemy" : "parry");
337 Act.TC.PlaySound("parry");
338 Act.TC.ModExp(ele2, 20);
339 parried = true;
340 return;
341 }
342 }
343 }
344 int num8 = 1;
345 if (chaser > 0)
346 {
347 for (int j = 0; j < 10; j++)
348 {
349 if (chaser > EClass.rnd(4 + (int)Mathf.Pow(4f, j + 2)))
350 {
351 num8++;
352 }
353 }
354 }
355 bool flag = false;
356 for (int k = 0; k < num8; k++)
357 {
359 {
360 break;
361 }
363 {
364 break;
365 }
366 if (k > 0)
367 {
368 Act.CC.Say(Act.CC.IsHostile() ? "attack_chaser_enemy" : "attack_chaser");
369 }
370 flag = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp * BaseDmgMTP, maxRoll, subAttack);
371 if (!flag && frustration > 0 && !Act.TC.HasElement(439) && 10f + 2f * Mathf.Sqrt(frustration) > (float)EClass.rnd(100))
372 {
373 AttackProcess.Current.critFury = true;
374 flag = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack);
375 AttackProcess.Current.critFury = false;
376 }
378 {
379 break;
380 }
381 }
382 if (flag)
383 {
384 hasHit = true;
385 }
386 else
387 {
388 hasMissed = true;
389 }
390 Act.TC = _tc;
391 Act.TP = _tp;
392 if (w != null && w.c_ammo > 0 && !Act.CC.HasCondition<ConReload>() && !safety)
393 {
394 bool flag2 = true;
395 TraitAmmo traitAmmo = ((w.ammoData == null) ? null : (w.ammoData.trait as TraitAmmo));
396 if (traitAmmo != null && traitAmmo is TraitAmmoTalisman traitAmmoTalisman)
397 {
398 flag2 = false;
399 if (flag && !usedTalisman && Act.TC != null && Act.TC.IsAliveInCurrentZone)
400 {
401 Act act = Act.CC.elements.GetElement(traitAmmoTalisman.owner.refVal)?.act ?? ACT.Create(traitAmmoTalisman.owner.refVal);
402 Act.powerMod = traitAmmo.owner.encLV;
403 if (act.Perform(Act.CC, Act.TC, Act.TP))
404 {
405 usedTalisman = true;
406 flag2 = true;
407 if (mod_talisman > 0 && Mathf.Min(10f + Mathf.Sqrt(mod_talisman) * 5f, 90f) > (float)EClass.rnd(100))
408 {
409 flag2 = false;
410 }
411 int spellExp = Act.CC.elements.GetSpellExp(Act.CC, act, 200);
412 Act.CC.ModExp(act.id, spellExp);
413 }
414 Act.powerMod = 100;
415 }
416 }
417 if (flag2)
418 {
419 w.c_ammo--;
420 if (w.ammoData != null)
421 {
422 w.ammoData.Num = w.c_ammo;
423 }
424 if (w.c_ammo <= 0)
425 {
426 w.c_ammo = 0;
427 w.ammoData = null;
428 }
430 }
431 }
432 Act.TC = _tc;
434 {
436 if (feint > 0 && 10f + 4f * Mathf.Sqrt(feint) > (float)EClass.rnd(100))
437 {
438 Act.TC.Chara.AddCondition<ConSupress>(100 + 5 * (int)Mathf.Sqrt(feint));
439 }
440 }
441 if (splash > 0)
442 {
443 Act.TP.ForeachNeighbor(delegate(Point p)
444 {
445 if (p.Equals(Act.TP) || p.Equals(Act.CC.pos))
446 {
447 return;
448 }
449 if (!p.IsBlocked)
450 {
451 p.PlayEffect("smoke_shockwave");
452 p.Copy().Animate(AnimeID.QuakeMini, animeBlock: true);
453 }
454 foreach (Card item4 in p.ListCards().Copy())
455 {
456 if ((item4.trait.CanBeAttacked || (item4.isChara && item4.Chara.IsHostile(Act.CC))) && !item4.HasElement(430))
457 {
458 long rawDamage2 = AttackProcess.Current.GetRawDamage(0.1f + 0.05f * Mathf.Sqrt(splash), crit: false, maxRoll: false);
459 rawDamage2 = item4.ApplyProtection(rawDamage2);
460 item4.DamageHP(rawDamage2, 0, 100, AttackSource.Shockwave, Act.CC);
461 }
462 }
463 });
464 }
465 if (Act.TC.isChara && !Act.TC.HasCondition<ConGravity>() && Act.TC.ExistsOnMap && knockback > 0 && knockback * 2 + 15 > EClass.rnd(100) && !Act.TC.isRestrained)
466 {
468 bool flag3 = Act.CC.id == "tsunami";
469 if (num9 == Card.MoveResult.Success)
470 {
471 Act.TC.renderer.SetFirst(first: true);
472 Act.TC.PlaySound("wave_hit_small");
473 if (flag3)
474 {
475 Act.TC.Chara.AddCondition<ConParalyze>(20, force: true);
476 Act.TC.Chara.AddCondition<ConSuffocation>(100, force: true);
477 }
478 }
479 else if (flag3)
480 {
481 Act.TC.PlaySound("wave_hit");
482 Act.TC.pos.PlayEffect("wave_hit");
483 Act.TC.Chara.AddCondition<ConSuffocation>(200, force: true);
484 if (!Act.TC.HasElement(430))
485 {
486 long rawDamage = AttackProcess.Current.GetRawDamage(1f, crit: false, maxRoll: false);
487 rawDamage = Act.TC.ApplyProtection(rawDamage);
488 Act.TC.DamageHP(rawDamage, 0, 100, AttackSource.Shockwave, Act.CC);
489 }
490 Act.CC.Die();
491 }
492 }
493 }
494 void AttackWithFlurry(Card _tc, Point _tp, float mtp, bool subAttack)
495 {
496 int num10 = 1;
497 if (flurry > 0)
498 {
499 for (int l = 0; l < 10 && flurry > EClass.rnd(25 + (int)Mathf.Pow(5f, l + 2)); l++)
500 {
501 num10++;
502 }
503 }
504 for (int m = 0; m < num10; m++)
505 {
507 {
508 break;
509 }
510 if (!_tc.IsAliveInCurrentZone)
511 {
512 break;
513 }
514 if (m > 0)
515 {
516 Act.CC.Say(Act.CC.IsHostile() ? "attack_flurry_enemy" : "attack_flurry");
517 }
518 Attack(_tc, _tp, mtp, subAttack);
519 if (parried)
520 {
521 break;
522 }
523 }
524 }
525 int GetWeaponEnc(int ele, bool addSelfEnc)
526 {
527 return AttackProcess.GetWeaponEnc(Act.CC, w, ele, addSelfEnc);
528 }
529 }
530 }
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
AttackStyle
Definition: AttackStyle.cs:2
Definition: ACT.cs:6
static Act Create(int id)
Definition: ACT.cs:36
static ActMelee Melee
Definition: ACT.cs:15
virtual bool ShouldRollMax
Definition: ActMelee.cs:10
override bool CanPerform()
Definition: ActMelee.cs:73
virtual bool AllowCounter
Definition: ActMelee.cs:6
override bool Perform()
Definition: ActMelee.cs:97
virtual float BaseDmgMTP
Definition: ActMelee.cs:12
virtual bool AllowParry
Definition: ActMelee.cs:8
virtual bool UseWeaponDist
Definition: ActMelee.cs:14
static bool TryReload(Thing weapon, Thing ammo=null)
Definition: ActRanged.cs:410
Definition: ACT.cs:62
virtual bool Perform()
Definition: ACT.cs:266
static Card TC
Definition: ACT.cs:79
static Point TP
Definition: ACT.cs:81
static Chara CC
Definition: ACT.cs:77
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
long GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
static int GetWeaponEnc(Chara CC, Thing w, int ele, bool addSelfEnc=false)
int elementId
Definition: BodySlot.cs:6
Thing thing
Definition: BodySlot.cs:8
void PlayAnime(AnimeID id, bool force)
virtual void NextFrame()
virtual void SetFirst(bool first, Vector3 pos)
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2272
virtual Chara Chara
Definition: Card.cs:2070
ElementContainerCard elements
Definition: Card.cs:41
int c_ammo
Definition: Card.cs:1461
bool IsRestrainedResident
Definition: Card.cs:2258
bool isRestrained
Definition: Card.cs:566
virtual bool IsDisabled
Definition: Card.cs:2111
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6145
Thing ammoData
Definition: Card.cs:1785
bool ExistsOnMap
Definition: Card.cs:2085
Point pos
Definition: Card.cs:59
virtual long ApplyProtection(long dmg, int mod=100)
Definition: Card.cs:4038
Trait trait
Definition: Card.cs:53
int encLV
Definition: Card.cs:326
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2127
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4063
MoveResult
Definition: Card.cs:13
virtual bool isChara
Definition: Card.cs:2083
int Evalue(int ele)
Definition: Card.cs:2571
int Dist(Card c)
Definition: Card.cs:7644
void ModExp(string alias, int a)
Definition: Card.cs:2648
SourceCategory.Row category
Definition: Card.cs:2049
CardRenderer renderer
Definition: Card.cs:61
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:5900
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6797
CellEffect effect
Definition: Cell.cs:94
List< BodySlot > slots
Definition: CharaBody.cs:8
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:457
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:561
CharaBody body
Definition: Chara.cs:94
MoveResult TryMoveFrom(Point p)
Definition: Chara.cs:2670
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9189
override bool IsPC
Definition: Chara.cs:612
bool RequestProtection(Chara attacker, Action< Chara > action)
Definition: Chara.cs:8319
bool HasCondition(string alias)
Definition: Chara.cs:9350
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Chara.cs:5271
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6295
bool IsHostile()
Definition: Chara.cs:6472
override void LookAt(Card c)
Definition: Chara.cs:3519
new GameConfig game
Definition: CoreConfig.cs:609
CoreConfig config
Definition: Core.cs:70
Definition: EClass.cs:6
static int curve(int _a, int start, int step, int rate=75)
Definition: EClass.cs:69
static Core core
Definition: EClass.cs:7
static void Wait(float a, Card c)
Definition: EClass.cs:112
static Zone _zone
Definition: EClass.cs:21
static Map _map
Definition: EClass.cs:19
static int rnd(long a)
Definition: EClass.cs:59
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656
int GetSpellExp(Chara c, Element e, int costMod=100)
Element GetElement(string alias)
int id
Definition: ELEMENT.cs:250
Act act
Definition: ELEMENT.cs:394
static void SetDirty(Thing t)
List< Point > ListPointsInLine(Point center, Point to, int radius)
Definition: Map.cs:2326
Definition: Point.cs:9
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1051
Point Copy()
Definition: Point.cs:491
Point Set(int _x, int _z)
Definition: Point.cs:503
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Definition: Point.cs:1397
bool IsBlocked
Definition: Point.cs:363
bool Equals(int _x, int _z)
Definition: Point.cs:960
Effect PlayEffect(string id)
Definition: Point.cs:1248
Cell cell
Definition: Point.cs:51
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1302
bool isPeace
Definition: Spatial.cs:406
Definition: Thing.cs:8
SourceThing.Row source
Definition: Thing.cs:11
bool IsMeleeWithAmmo
Definition: Thing.cs:20
virtual bool CanBeAttacked
Definition: Trait.cs:166
Card owner
Definition: Trait.cs:27

References EClass._map, EClass._zone, Element.act, Chara.AddCondition(), AllowCounter, AllowParry, Point.Animate(), Card.ApplyProtection(), Attack, BaseDmgMTP, Chara.body, Card.c_ammo, Trait.CanBeAttacked, CanPerform(), Card.category, Act.CC, Point.cell, Card.Chara, Core.config, EInput.Consume(), Point.Copy(), EClass.core, ACT.Create(), AttackProcess.Current, EClass.curve(), Card.DamageHP(), Chara.Die(), Card.Dist(), Chara.DoHostileAction(), Cell.effect, BodySlot.elementId, Card.elements, Card.encLV, Point.Equals(), Card.Evalue(), Point.ForeachNeighbor(), CoreConfig.game, CharaBody.GetAttackStyle(), ElementContainer.GetElement(), AttackProcess.GetRawDamage(), ElementContainer.GetSpellExp(), AttackProcess.GetWeaponEnc(), Chara.HasCondition(), Card.HasElement(), CellEffect.id, Element.id, Card.IsAliveInCurrentZone, Chara.IsAliveInCurrentZone, Point.IsBlocked, Card.isChara, Card.IsDisabled, Chara.IsHostile(), Thing.IsMeleeWithAmmo, Chara.IsPC, Card.IsPCFactionOrMinion, Spatial.isPeace, Card.isRestrained, Card.IsRestrainedResident, item, Point.ListCards(), Map.ListPointsInLine(), Chara.LookAt(), ACT.Melee, Card.ModExp(), CardRenderer.NextFrame(), Trait.owner, Act.Perform(), Perform(), AttackProcess.Perform(), CardRenderer.PlayAnime(), Point.PlayEffect(), Card.PlaySound(), Card.pos, AttackProcess.Prepare(), Card.renderer, Chara.RequestProtection(), EClass.rnd(), safety, Card.Say(), Point.Set(), LayerInventory.SetDirty(), CardRenderer.SetFirst(), ShouldRollMax, CharaBody.slots, Thing.source, Act.TC, BodySlot.thing, Act.TP, Card.trait, Chara.TryMoveFrom(), ActRanged.TryReload(), UseWeaponDist, EClass.Wait(), and CoreConfig.GameConfig.waitOnMelee.

◆ CanPerform()

override bool ActMelee.CanPerform ( )
inlinevirtual

Reimplemented from Act.

Reimplemented in ActRush.

Definition at line 73 of file ActMelee.cs.

74 {
75 if (Act.TC == null || !Act.TC.IsAliveInCurrentZone)
76 {
77 return false;
78 }
80 {
81 return false;
82 }
83 if (PerformDistance == 1)
84 {
86 {
87 return false;
88 }
89 }
90 else if (!Act.CC.CanSeeLos(Act.TC))
91 {
92 return false;
93 }
94 return base.CanPerform();
95 }
override int PerformDistance
Definition: ActMelee.cs:17
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1250
bool CanInteractTo(Card c)
Definition: Chara.cs:2509

References Chara.CanInteractTo(), Chara.CanSeeLos(), Act.CC, Card.Dist(), Card.IsAliveInCurrentZone, PerformDistance, Act.TC, and UseWeaponDist.

Referenced by Attack(), ActMultihit.CanPerform(), and ActWhirlwind.CanPerform().

◆ GetCursorIcon()

override CursorInfo ActMelee.GetCursorIcon ( Card  c)
inlinevirtual

Reimplemented from Act.

Definition at line 59 of file ActMelee.cs.

60 {
61 if (!HideHint(c))
62 {
64 }
65 return null;
66 }
bool HideHint(Card c)
Definition: ActMelee.cs:32
static CursorInfo IconMelee

References HideHint(), and CursorSystem.IconMelee.

◆ GetHintText()

override string ActMelee.GetHintText ( string  str = "")
inlinevirtual

Reimplemented from Act.

Definition at line 45 of file ActMelee.cs.

46 {
47 return "";
48 }

◆ GetTextSmall()

override string ActMelee.GetTextSmall ( Card  c)
inlinevirtual

Reimplemented from Act.

Definition at line 50 of file ActMelee.cs.

51 {
52 if (!HideHint(c))
53 {
54 return base.GetTextSmall(c);
55 }
56 return null;
57 }

References HideHint().

◆ HideHint()

bool ActMelee.HideHint ( Card  c)
inline

Definition at line 32 of file ActMelee.cs.

33 {
34 if (!EClass.pc.isBlind && c != null)
35 {
36 if (c.isChara)
37 {
38 return !EClass.pc.CanSee(c);
39 }
40 return false;
41 }
42 return true;
43 }
bool CanSee(Card c)
Definition: Chara.cs:1218
bool isBlind
Definition: Chara.cs:130
static Chara pc
Definition: EClass.cs:15

References Chara.CanSee(), Chara.isBlind, Card.isChara, and EClass.pc.

Referenced by GetCursorIcon(), GetTextSmall(), and ShowMouseHint().

◆ Perform()

override bool ActMelee.Perform ( )
inlinevirtual

Reimplemented from Act.

Reimplemented in ActRush.

Definition at line 97 of file ActMelee.cs.

98 {
99 Act.CurrentAct = this;
100 bool result = Attack();
101 Act.CurrentAct = null;
102 return result;
103 }

References Attack.

Referenced by Attack(), AI_PracticeDummy.CreateProgress(), TraitTrainingDummy.IdleUse(), ActMultihit.Perform(), ActSwarm.Perform(), and ActWhirlwind.Perform().

◆ ShowMouseHint()

override bool ActMelee.ShowMouseHint ( Card  c)
inlinevirtual

Reimplemented from Act.

Definition at line 68 of file ActMelee.cs.

69 {
70 return !HideHint(c);
71 }

References HideHint().

Property Documentation

◆ AllowCounter

virtual bool ActMelee.AllowCounter
get

Definition at line 6 of file ActMelee.cs.

Referenced by Attack().

◆ AllowParry

virtual bool ActMelee.AllowParry
get

Definition at line 8 of file ActMelee.cs.

Referenced by Attack().

◆ BaseDmgMTP

virtual float ActMelee.BaseDmgMTP
get

Definition at line 12 of file ActMelee.cs.

Referenced by Attack().

◆ CanPressRepeat

override bool ActMelee.CanPressRepeat
get

Definition at line 30 of file ActMelee.cs.

◆ PerformDistance

override int ActMelee.PerformDistance
get

Definition at line 16 of file ActMelee.cs.

17 {
18 get
19 {
20 if (Act.CC != null)
21 {
22 return Act.CC.body.GetMeleeDistance();
23 }
24 return 1;
25 }
26 }
int GetMeleeDistance()
Definition: CharaBody.cs:444

Referenced by CanPerform().

◆ ResetAxis

override bool ActMelee.ResetAxis
get

Definition at line 28 of file ActMelee.cs.

◆ ShouldRollMax

virtual bool ActMelee.ShouldRollMax
get

Definition at line 10 of file ActMelee.cs.

Referenced by Attack().

◆ UseWeaponDist

virtual bool ActMelee.UseWeaponDist
get

Definition at line 14 of file ActMelee.cs.

Referenced by Attack(), and CanPerform().


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