Elin Decompiled Documentation EA 23.183 Nightly Patch 1
Loading...
Searching...
No Matches
AttackProcess Class Reference
Inheritance diagram for AttackProcess:
EClass

Public Member Functions

string GetText ()
 
void Prepare (Chara _CC, Thing _weapon, Card _TC=null, Point _TP=null, int _attackIndex=0, bool _isThrow=false)
 
void PlayRangedAnime (int numFire)
 
int GetRawDamage (float dmgMulti, bool crit, bool maxRoll)
 
bool Perform (int count, bool hasHit, float dmgMulti=1f, bool maxRoll=false, bool subAttack=false)
 
bool CalcHit ()
 
string GetAttackText (AttackType type, int id)
 

Static Public Member Functions

static int GetWeaponEnc (Chara CC, Thing w, int ele, bool addSelfEnc=false)
 
- 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

int dNum
 
int dDim
 
int dBonus
 
int toHit
 
int toHitBase
 
int toHitFix
 
int evasion
 
int penetration
 
int distMod
 
int attackIndex
 
int dNumAmmo
 
int dDimAmmo
 
int dBonusAmmo
 
int numFire
 
int numFireWithoutDamageLoss
 
float dMulti
 
bool crit
 
bool critFury
 
bool hit
 
bool evadePlus
 
bool isThrow
 
bool ignoreAnime
 
bool ignoreAttackSound
 
Chara CC
 
Card TC
 
Point TP
 
Point posRangedAnime
 
Element weaponSkill
 
Thing weapon
 
Thing ammo
 
TraitToolRange toolRange
 
AttackType attackType
 
AttackStyle attackStyle
 

Static Public Attributes

static AttackProcess Current = new AttackProcess()
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

bool IsMartial [get]
 
bool IsMartialWeapon [get]
 
bool IsRanged [get]
 
bool IsCane [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]
 

Private Member Functions

bool Crit ()
 
bool EvadePlus ()
 

Detailed Description

Definition at line 6 of file AttackProcess.cs.

Member Function Documentation

◆ CalcHit()

bool AttackProcess.CalcHit ( )
inline

Definition at line 886 of file AttackProcess.cs.

887 {
888 if (critFury)
889 {
890 crit = true;
891 return true;
892 }
893 if (TC != null)
894 {
895 if (TC.HasCondition<ConDim>() && EClass.rnd(4) == 0)
896 {
897 return Crit();
898 }
899 if (TC.IsDeadOrSleeping)
900 {
901 return Crit();
902 }
903 int num = TC.Evalue(151);
904 if (num != 0 && toHit < num * 10)
905 {
906 int num2 = evasion * 100 / Mathf.Clamp(toHit, 1, toHit);
907 if (num2 > 300 && EClass.rnd(num + 250) > 100)
908 {
909 return EvadePlus();
910 }
911 if (num2 > 200 && EClass.rnd(num + 250) > 150)
912 {
913 return EvadePlus();
914 }
915 if (num2 > 150 && EClass.rnd(num + 250) > 200)
916 {
917 return EvadePlus();
918 }
919 }
920 if (TC.Evalue(57) > EClass.rnd(100))
921 {
922 return EvadePlus();
923 }
924 }
925 if (EClass.rnd(20) == 0)
926 {
927 return true;
928 }
929 if (EClass.rnd(20) == 0)
930 {
931 return false;
932 }
933 if (toHit < 1)
934 {
935 return false;
936 }
937 if (evasion < 1)
938 {
939 return true;
940 }
941 if (EClass.rnd(toHit) < EClass.rnd(evasion * (IsRanged ? 150 : 125) / 100))
942 {
943 return false;
944 }
945 if (EClass.rnd(5000) < CC.Evalue(73) + 50)
946 {
947 return Crit();
948 }
949 if ((float)(CC.Evalue(90) + ((weapon != null) ? weapon.Evalue(90, ignoreGlobalElement: true) : 0)) + Mathf.Sqrt(CC.Evalue(134)) > (float)EClass.rnd(200))
950 {
951 return Crit();
952 }
953 if (CC.Evalue(1420) > 0)
954 {
955 int num3 = Mathf.Min(100, 100 - CC.hp * 100 / CC.MaxHP) * (50 + CC.Evalue(1420) * 50) / 100;
956 if (num3 >= 50 && num3 * num3 * num3 * num3 / 3 > EClass.rnd(100000000))
957 {
958 return Crit();
959 }
960 }
961 return true;
962 }
int hp
Definition: Card.cs:228
int Evalue(int ele)
Definition: Card.cs:2533
override int MaxHP
Definition: Chara.cs:706
Definition: ConDim.cs:2
Definition: EClass.cs:5
static int rnd(long a)
Definition: EClass.cs:58
Definition: TC.cs:4

References CC, crit, Crit(), critFury, EvadePlus(), Card.Evalue(), evasion, Card.hp, IsRanged, Chara.MaxHP, EClass.rnd(), toHit, and weapon.

Referenced by Perform().

◆ Crit()

bool AttackProcess.Crit ( )
inlineprivate

Definition at line 874 of file AttackProcess.cs.

875 {
876 crit = true;
877 return true;
878 }

References crit.

Referenced by CalcHit().

◆ EvadePlus()

bool AttackProcess.EvadePlus ( )
inlineprivate

Definition at line 880 of file AttackProcess.cs.

881 {
882 evadePlus = true;
883 return false;
884 }

References evadePlus.

Referenced by CalcHit().

◆ GetAttackText()

string AttackProcess.GetAttackText ( AttackType  type,
int  id 
)
inline

Definition at line 964 of file AttackProcess.cs.

965 {
966 return Lang.GetList("attack" + type)[id];
967 }
Definition: Lang.cs:6
static string[] GetList(string id)
Definition: Lang.cs:114

References Lang.GetList().

Referenced by Perform().

◆ GetRawDamage()

int AttackProcess.GetRawDamage ( float  dmgMulti,
bool  crit,
bool  maxRoll 
)
inline

Definition at line 410 of file AttackProcess.cs.

411 {
412 bool flag = CC.HasCondition<ConReload>();
413 int num = Dice.Roll(dNum, dDim, dBonus, CC);
414 if (ammo != null && !flag)
415 {
417 }
418 if (crit || maxRoll)
419 {
420 num = Dice.RollMax(dNum, dDim, dBonus);
421 if (ammo != null && !flag)
422 {
424 }
425 if (crit && (IsMartial || IsMartialWeapon))
426 {
427 dMulti *= 1.25f;
428 }
429 }
430 int num2 = CC.Evalue(1355);
431 ConStrife condition = CC.GetCondition<ConStrife>();
432 if (condition != null)
433 {
434 num += condition.GetDice().Roll();
435 }
436 else if (num2 > 0)
437 {
438 num++;
439 }
440 num = Mathf.Clamp(num, 0, 9999999);
441 num = (int)(dMulti * (float)num * dmgMulti);
442 return Mathf.Clamp(num, 0, 9999999);
443 }
bool IsMartialWeapon
bool HasCondition(string alias)
Definition: Chara.cs:8926
Dice GetDice()
Definition: ConStrife.cs:52
Definition: Dice.cs:4
static int RollMax(int num, int sides, int bonus=0)
Definition: Dice.cs:46
static int Roll(int num, int sides, int bonus=0, Card card=null)
Definition: Dice.cs:15

References ammo, CC, crit, dBonus, dBonusAmmo, dDim, dDimAmmo, dMulti, dNum, dNumAmmo, Card.Evalue(), ConStrife.GetDice(), Chara.HasCondition(), IsMartial, IsMartialWeapon, Dice.Roll(), and Dice.RollMax().

Referenced by ActMelee.Attack(), and Perform().

◆ GetText()

string AttackProcess.GetText ( )
inline

Definition at line 119 of file AttackProcess.cs.

120 {
121 string text = dNum + "d" + dDim;
122 text = text + ((dBonus >= 0) ? "+" : "") + dBonus;
123 string @ref = (IsMartial ? "evalHand".lang() : "evalWeapon".lang((attackIndex + 1).ToString() ?? ""));
124 return "attackEval".lang(@ref, text, dMulti.ToString("F2") ?? "", toHit.ToString() ?? "", penetration.ToString() ?? "");
125 }

References attackIndex, dBonus, dDim, dMulti, dNum, IsMartial, penetration, and toHit.

Referenced by Thing.AddAttackEvaluation().

◆ GetWeaponEnc()

static int AttackProcess.GetWeaponEnc ( Chara  CC,
Thing  w,
int  ele,
bool  addSelfEnc = false 
)
inlinestatic

Definition at line 114 of file AttackProcess.cs.

115 {
116 return (addSelfEnc ? CC.Evalue(ele) : 0) + (w?.Evalue(ele) ?? 0) + (CC.IsPCFactionOrMinion ? EClass.pc.faction.charaElements.Value(ele) : 0);
117 }
bool IsPCFactionOrMinion
Definition: Card.cs:2234
Faction faction
Definition: Chara.cs:425
static Chara pc
Definition: EClass.cs:14
int Value(int ele)
ElementContainerFaction charaElements
Definition: FACTION.cs:146

References CC, Faction.charaElements, Card.Evalue(), Chara.faction, Card.IsPCFactionOrMinion, EClass.pc, and ElementContainer.Value().

Referenced by ActMelee.Attack(), and Perform().

◆ Perform()

bool AttackProcess.Perform ( int  count,
bool  hasHit,
float  dmgMulti = 1f,
bool  maxRoll = false,
bool  subAttack = false 
)
inline

Definition at line 445 of file AttackProcess.cs.

446 {
447 bool flag = CC.HasCondition<ConReload>();
448 bool flag2 = CC.HasElement(486) && CC.IsPCFactionOrMinion;
449 hit = CalcHit();
450 if (CC.id == "tsunami")
451 {
452 hit = true;
453 }
454 int num = GetRawDamage(dmgMulti, crit, maxRoll);
455 if (IsRanged && count >= numFireWithoutDamageLoss)
456 {
457 num = num * 100 / (100 + (count - numFireWithoutDamageLoss + 1) * 30);
458 }
459 if (CC.isRestrained)
460 {
461 num /= 2;
462 }
463 List<Element> list2 = new List<Element>();
464 int num2 = CC.Evalue(91);
465 int num3 = 0;
466 if (weapon != null)
467 {
468 list2 = weapon.elements.dict.Values.ToList();
469 if (ammo != null && !flag)
470 {
471 list2 = list2.Concat(ammo.elements.dict.Values).ToList();
472 }
473 num2 += weapon.Evalue(91, ignoreGlobalElement: true);
474 num3 += weapon.Evalue(603, ignoreGlobalElement: true);
475 }
476 else
477 {
478 string id = CC.id;
479 if (id == "rabbit_vopal" || id == "mantis_killer")
480 {
481 list2.Add(Element.Create(6650, 100));
482 }
483 }
484 int bane;
485 if (TC?.Chara != null)
486 {
487 bane = 0;
488 AddBane(valid: true, 468, 50);
489 AddBane(TC.Chara.IsUndead, 461, 100);
490 AddBane(TC.Chara.IsAnimal, 463, 100);
491 AddBane(TC.Chara.IsHuman, 464, 100);
492 AddBane(TC.Chara.IsDragon, 460, 100);
493 AddBane(TC.Chara.IsGod, 466, 100);
494 AddBane(TC.Chara.IsMachine, 465, 100);
495 AddBane(TC.Chara.IsFish, 467, 100);
496 AddBane(TC.Chara.IsFairy, 462, 100);
497 if (bane != 0)
498 {
499 num = num * (100 + bane * 3) / 100;
500 }
501 }
502 if (CC.IsPCFaction)
503 {
504 foreach (Element value in EClass.pc.faction.charaElements.dict.Values)
505 {
506 if (value.Value > 0)
507 {
508 list2.Add(value);
509 }
510 }
511 }
512 if (hit && num2 > EClass.rnd(100))
513 {
514 CC.Say("vopal");
515 penetration = 100;
516 }
517 if (crit)
518 {
519 CC.Say((critFury ? "fury_" : "") + (CC.IsHostile() ? "critical_enemy" : "critical"));
520 if (CC.IsPC)
521 {
522 CC.PlaySound("critical");
523 }
524 }
525 if (CC.isSynced || (TC != null && TC.isSynced))
526 {
527 if (toolRange != null && (!IsRanged || count == 0) && !flag && !ignoreAnime)
528 {
530 }
531 if (hit && TC != null && !hasHit)
532 {
533 PlayHitEffect();
534 }
535 }
536 if (TC == null)
537 {
538 CC.Say(IsRanged ? "attack_air_range" : "attack_air", CC);
539 return true;
540 }
541 if (!hit)
542 {
543 if (TC != null)
544 {
545 if (CC.IsPCParty)
546 {
547 CC.Say(evadePlus ? "evadePlus2" : "evade2", CC, TC);
548 }
549 else
550 {
551 TC.Say(evadePlus ? "evadePlus" : "evade", TC, CC);
552 }
553 ModExpDef(150, 90);
554 ModExpDef(151, 90);
555 }
556 Proc(list2);
557 return false;
558 }
559 if (TC.IsPC)
560 {
561 Msg.SetColor("attack_pc");
562 EClass.pc.Say("attackMeleeToPC", CC, TC, GetAttackText(attackType, 3));
563 }
564 else
565 {
566 CC.Say("attackMelee", CC, TC, GetAttackText(attackType, 0));
567 }
568 bool showEffect = true;
569 int num4 = 0;
570 int num5 = 0;
571 int num6 = 0;
572 ConWeapon conWeapon = null;
573 if (weapon != null)
574 {
575 foreach (Element value2 in weapon.elements.dict.Values)
576 {
577 if (value2.source.categorySub == "eleConvert")
578 {
579 num4 = EClass.sources.elements.alias[value2.source.aliasRef].id;
580 num5 = 50 + value2.Value * 2;
581 num6 = Mathf.Min(value2.Value, 100);
582 break;
583 }
584 }
585 }
586 if (num4 == 0)
587 {
589 {
590 conWeapon = CC.GetCondition<ConWeapon>();
591 num4 = conWeapon.sourceElement.id;
592 num5 = conWeapon.power / 2;
593 num6 = (int)Mathf.Min(40f + MathF.Sqrt(conWeapon.power), 80f);
594 }
595 if (conWeapon == null && weapon == null && (CC.MainElement != Element.Void || CC.HasElement(1565)))
596 {
597 num4 = (CC.HasElement(1565) ? 915 : CC.MainElement.id);
598 num5 = CC.Power / 3 + EClass.rnd(CC.Power / 2);
599 if (CC.MainElement != Element.Void)
600 {
601 num5 += CC.MainElement.Value;
602 }
603 showEffect = false;
604 num6 = 50;
605 }
606 if (conWeapon == null && weapon != null && weapon.trait is TraitToolRangeCane)
607 {
608 IEnumerable<Element> enumerable = weapon.elements.dict.Values.Where((Element e) => e.source.categorySub == "eleAttack");
609 if (enumerable.Count() > 0)
610 {
611 num4 = enumerable.RandomItem().id;
612 num5 = num4 switch
613 {
614 920 => 30,
615 914 => 50,
616 918 => 50,
617 _ => 100,
618 };
619 }
620 num6 = 50;
621 }
622 }
623 int num7 = num;
624 int num8 = num * num6 / 100;
625 num -= num8;
626 int num9 = num * penetration / 100;
627 num -= num9;
628 num = TC.ApplyProtection(num) + num9 + num8;
629 int weaponEnc = GetWeaponEnc(CC, weapon, 609, addSelfEnc: true);
630 TC.DamageHP(num, num4, num5, (!IsRanged && !isThrow) ? AttackSource.Melee : AttackSource.Range, CC, showEffect, weapon);
631 if (conWeapon != null && (weaponEnc <= 0 || !(Mathf.Min(10f + Mathf.Sqrt(weaponEnc) * 5f, 90f) > (float)EClass.rnd(100))))
632 {
633 conWeapon.Mod(-1);
634 }
635 bool flag3 = IsCane || (weapon != null && weapon.Evalue(482) > 0);
636 int attackStyleElement = CC.body.GetAttackStyleElement(attackStyle);
637 if (!subAttack)
638 {
639 int mod2 = 100 / (count + 1);
640 if (!IsRanged || count == 0)
641 {
642 ModExpAtk(weaponSkill.id, mod2);
643 ModExpAtk(flag3 ? 304 : (IsRanged ? 133 : 132), mod2);
644 }
645 if (crit)
646 {
647 ModExpAtk(134, 50);
648 }
649 if (count == 0 && attackStyleElement != 0)
650 {
651 ModExpAtk(attackStyleElement, 100);
652 }
653 }
654 if (!CC.IsAliveInCurrentZone || !TC.IsAliveInCurrentZone)
655 {
656 return true;
657 }
658 if (EClass.rnd(8) == 0 && TC.isChara && CC.HasElement(1219))
659 {
660 CC.Say("abCrab", CC, TC);
661 TC.Chara.AddCondition<ConParalyze>(30 + EClass.rnd(30));
662 TC.Chara.AddCondition<ConGravity>();
663 }
664 if (list2.Count > 0 && !flag2)
665 {
666 foreach (Element item in list2)
667 {
668 if (!TC.IsAliveInCurrentZone)
669 {
670 break;
671 }
672 if (item.IsActive(weapon) && item.source.categorySub == "eleAttack")
673 {
674 int num10 = 25;
675 int dmg = EClass.rnd(num * (100 + item.Value * 10) / 500 + 5);
676 if (conWeapon == null && weapon != null && weapon.trait is TraitToolRangeCane)
677 {
678 num10 = 0;
679 }
680 if (num10 > EClass.rnd(100))
681 {
682 TC.DamageHP(dmg, item.id, isThrow ? (100 + item.Value * 5) : (30 + item.Value), AttackSource.WeaponEnchant, CC);
683 }
684 }
685 }
686 Proc(list2);
687 }
688 if (!CC.IsAliveInCurrentZone || !TC.IsAliveInCurrentZone)
689 {
690 return true;
691 }
692 if (!IsRanged && !flag2 && attackStyle == AttackStyle.Shield)
693 {
694 int num11 = CC.Evalue(123);
695 if (CC.elements.ValueWithoutLink(123) >= 10 && Mathf.Clamp(Mathf.Sqrt(num11) - 2f, 8f, 12f) > (float)EClass.rnd(100))
696 {
697 num = num7 * Mathf.Min(50 + num11, 200) / 100;
698 num = TC.ApplyProtection(num);
699 Debug.Log("Bash:" + num + "/" + num7);
700 CC.PlaySound("shield_bash");
701 CC.Say("shield_bash", CC, TC);
702 TC.DamageHP(num, AttackSource.None, CC);
703 if (TC.IsAliveInCurrentZone && TC.isChara)
704 {
705 if (EClass.rnd(2) == 0)
706 {
707 TC.Chara.AddCondition<ConDim>(50 + (int)Mathf.Sqrt(num11) * 10);
708 }
709 TC.Chara.AddCondition<ConParalyze>(EClass.rnd(2), force: true);
710 }
711 }
712 }
713 if (!CC.IsAliveInCurrentZone || !TC.IsAliveInCurrentZone)
714 {
715 return true;
716 }
717 if (TC.isChara && !TC.HasCondition<ConGravity>() && num3 > 0 && num3 * 2 + 15 > EClass.rnd(100) && !TC.isRestrained && TC.Chara.TryMoveFrom(CC.pos) == Card.MoveResult.Success)
718 {
719 TC.pos.PlayEffect("vanish");
720 TC.PlaySound("push", 1.5f);
721 }
722 return true;
723 void AddBane(bool valid, int idEle, int mod)
724 {
725 if (valid)
726 {
727 bane += (CC.Evalue(idEle) + ((weapon != null) ? weapon.Evalue(idEle, ignoreGlobalElement: true) : 0)) * mod / 100;
728 }
729 }
730 bool IgnoreExp()
731 {
732 if (!CC.HasEditorTag(EditorTag.Invulnerable) && !CC.HasEditorTag(EditorTag.InvulnerableToMobs) && !TC.HasEditorTag(EditorTag.Invulnerable))
733 {
734 return TC.HasEditorTag(EditorTag.InvulnerableToMobs);
735 }
736 return true;
737 }
738 void ModExpAtk(int ele, int mod)
739 {
740 if (!IgnoreExp() && (!TC.isCopy || EClass.rnd(10) == 0))
741 {
742 int a = (Mathf.Clamp((TC.LV + 10 - CC.elements.ValueWithoutLink(ele)) / 2, 1, 10) + Mathf.Min(TC.LV / 10, 10)) * mod / 100;
743 a = Mathf.Min(a, 200);
744 if (TC == CC)
745 {
746 a /= 2;
747 }
748 if (a > 0)
749 {
750 CC.ModExp(ele, a + EClass.rnd(a / 2 + 1));
751 }
752 }
753 }
754 void ModExpDef(int ele, int mod)
755 {
756 if (!IgnoreExp() && (!CC.isCopy || EClass.rnd(10) == 0))
757 {
758 int a2 = (Mathf.Clamp((CC.LV + 10 - TC.elements.ValueWithoutLink(ele)) / 2, 1, 10) + Mathf.Min(CC.LV / 10, 10)) * mod / 100;
759 a2 = Mathf.Min(a2, TC.isRestrained ? 10 : 200);
760 if (TC == CC)
761 {
762 a2 /= 2;
763 }
764 if (!TC.IsPC && !TC.isRestrained && !TC.HasHost)
765 {
766 a2 *= 3;
767 }
768 if (a2 > 0)
769 {
770 TC.ModExp(ele, a2 + EClass.rnd(a2 / 2 + 1));
771 }
772 }
773 }
774 void PlayHitEffect()
775 {
776 string id2 = "hit_default";
777 string id3 = "hit_default";
778 switch (attackType)
779 {
780 case AttackType.Slash:
781 id3 = "hit_slash";
782 id2 = "hit_slash";
783 break;
784 case AttackType.Spore:
785 id3 = "hit_spore";
786 id2 = "hit_spore";
787 break;
788 case AttackType.Claw:
789 case AttackType.Bite:
790 id3 = "hit_claw";
791 id2 = "hit_claw";
792 break;
793 case AttackType.Blunt:
794 case AttackType.Punch:
795 case AttackType.Kick:
796 case AttackType.Bow:
797 case AttackType.Gun:
798 case AttackType.Cane:
799 id3 = "hit_blunt";
800 id2 = "hit_blunt";
801 break;
802 }
803 if (TC != null)
804 {
805 TC.PlayEffect(id3).SetScale(crit ? 1.25f : 0.75f);
806 }
807 CC.PlaySound(id2);
808 }
809 void Proc(List<Element> list)
810 {
811 if (list == null)
812 {
813 return;
814 }
815 foreach (Element item2 in list)
816 {
817 if (item2 is Ability)
818 {
819 int num12 = 10 + item2.Value / 5;
820 int power = EClass.curve((100 + item2.Value * 10) * (100 + weaponSkill.Value) / 100, 400, 100);
821 if (num12 > EClass.rnd(100))
822 {
823 Act obj = item2 as Act;
824 Card card = (obj.TargetType.CanSelectSelf ? CC : TC);
825 string text = ((item2.source.proc.Length >= 2) ? item2.source.proc[1] : "");
826 string text2 = obj.source.abilityType.TryGet(0);
827 switch (text2)
828 {
829 case "buff":
830 if (CC.HasCondition(text))
831 {
832 continue;
833 }
834 card = CC;
835 break;
836 case "debuff":
837 case "attack":
838 case "dot":
839 card = TC;
840 break;
841 }
842 if (subAttack)
843 {
844 if (card == CC)
845 {
846 continue;
847 }
848 switch (text2)
849 {
850 case "attackArea":
851 case "summon":
852 case "teleport":
853 case "suicide":
854 continue;
855 }
856 }
857 if (card.IsAliveInCurrentZone)
858 {
859 Card tC = TC;
860 ActEffect.ProcAt(item2.source.proc[0].ToEnum<EffectId>(), power, BlessedState.Normal, CC, card, card.pos, isNeg: false, new ActRef
861 {
862 n1 = text,
863 aliasEle = item2.source.aliasRef,
864 noFriendlyFire = true
865 });
866 TC = tC;
867 }
868 }
869 }
870 }
871 }
872 }
AttackSource
Definition: AttackSource.cs:2
AttackStyle
Definition: AttackStyle.cs:2
AttackType
Definition: AttackType.cs:2
BlessedState
Definition: BlessedState.cs:2
EditorTag
Definition: EditorTag.cs:2
EffectId
Definition: EffectId.cs:2
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:411
Definition: ACT.cs:62
TraitToolRange toolRange
AttackType attackType
string GetAttackText(AttackType type, int id)
int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
int numFireWithoutDamageLoss
Element weaponSkill
static int GetWeaponEnc(Chara CC, Thing w, int ele, bool addSelfEnc=false)
AttackStyle attackStyle
void PlayRangedAnime(int numFire)
void Mod(int a, bool force=false)
SourceElement.Row sourceElement
Definition: Card.cs:11
ElementContainerCard elements
Definition: Card.cs:39
string id
Definition: Card.cs:33
bool HasElement(int ele, int req=1)
Definition: Card.cs:5638
bool isRestrained
Definition: Card.cs:552
virtual int Power
Definition: Card.cs:2257
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5852
bool isCopy
Definition: Card.cs:864
Point pos
Definition: Card.cs:57
Trait trait
Definition: Card.cs:51
MoveResult
Definition: Card.cs:13
bool HasEditorTag(EditorTag tag)
Definition: Card.cs:2562
void ModExp(string alias, int a)
Definition: Card.cs:2610
int LV
Definition: Card.cs:372
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6499
int GetAttackStyleElement(AttackStyle style)
Definition: CharaBody.cs:466
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:559
Element MainElement
Definition: Chara.cs:715
CharaBody body
Definition: Chara.cs:94
override bool IsPC
Definition: Chara.cs:610
override bool IsPCParty
Definition: Chara.cs:613
override bool isSynced
Definition: Chara.cs:689
override bool IsPCFaction
Definition: Chara.cs:669
bool IsHostile()
Definition: Chara.cs:6193
static int curve(int a, int start, int step, int rate=75)
Definition: EClass.cs:68
static SourceManager sources
Definition: EClass.cs:42
Dictionary< int, Element > dict
int ValueWithoutLink(int ele)
int id
Definition: ELEMENT.cs:248
SourceElement.Row source
Definition: ELEMENT.cs:271
int Value
Definition: ELEMENT.cs:290
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1097
static Element Void
Definition: ELEMENT.cs:236
Definition: Msg.cs:5
static void SetColor()
Definition: Msg.cs:22
SourceElement elements
Definition: ActRef.cs:2

References ammo, attackStyle, attackType, Chara.body, CalcHit(), card, CC, Faction.charaElements, Element.Create(), crit, critFury, EClass.curve(), Debug, ElementContainer.dict, Card.elements, SourceManager.elements, evadePlus, Card.Evalue(), Chara.faction, CharaBody.GetAttackStyleElement(), GetAttackText(), GetRawDamage(), GetWeaponEnc(), Chara.HasCondition(), Card.HasEditorTag(), Card.HasElement(), hit, Card.id, Element.id, ignoreAnime, Chara.IsAliveInCurrentZone, IsCane, Card.isCopy, Chara.IsHostile(), Chara.IsPC, Chara.IsPCFaction, Card.IsPCFactionOrMinion, Chara.IsPCParty, IsRanged, Card.isRestrained, Chara.isSynced, isThrow, item, Card.LV, Chara.MainElement, BaseCondition.Mod(), Card.ModExp(), numFire, numFireWithoutDamageLoss, EClass.pc, penetration, PlayRangedAnime(), Card.PlaySound(), Card.pos, BaseCondition.power, Card.Power, ActEffect.ProcAt(), EClass.rnd(), Card.Say(), Msg.SetColor(), Element.source, BaseCondition.sourceElement, EClass.sources, TC, toolRange, Card.trait, Element.Value, ElementContainer.ValueWithoutLink(), Element.Void, weapon, and weaponSkill.

Referenced by ActMelee.Attack(), ActRanged.Perform(), and ActThrow.Throw().

◆ PlayRangedAnime()

void AttackProcess.PlayRangedAnime ( int  numFire)
inline

Definition at line 338 of file AttackProcess.cs.

339 {
340 if (weapon == null)
341 {
342 return;
343 }
344 bool isGun = toolRange is TraitToolRangeGun;
345 bool isCane = toolRange is TraitToolRangeCane;
346 GameSetting.EffectData data = EClass.setting.effect.guns.TryGetValue(weapon.id) ?? EClass.setting.effect.guns[isCane ? "cane" : (isGun ? "gun" : "bow")];
347 bool isPCC = CC.IsPCC && CC.renderer.hasActor;
348 Vector2 firePos = (isPCC ? new Vector2(data.firePos.x * (float)((CC.renderer.actor.currentDir != 0 && CC.renderer.actor.currentDir != 1) ? 1 : (-1)), data.firePos.y) : Vector2.zero);
349 Chara _CC = CC;
350 Point _TP = posRangedAnime.Copy();
351 Thing _weapon = weapon;
352 bool ignoreSound = ignoreAttackSound;
354 Color effColor = Color.white;
355 if (isCane)
356 {
357 IEnumerable<Element> enumerable = toolRange.owner.elements.dict.Values.Where((Element e) => e.source.categorySub == "eleAttack");
358 if (enumerable.Count() > 0)
359 {
360 Element element = enumerable.RandomItem();
361 effColor = EClass.Colors.elementColors[element.source.alias];
362 }
363 }
364 for (int i = 0; i < numFire; i++)
365 {
366 TweenUtil.Delay((float)i * data.delay, delegate
367 {
368 if (EClass.core.IsGameStarted && _CC.IsAliveInCurrentZone && _zone == _CC.currentZone)
369 {
370 if (_weapon.id == "gun_rail")
371 {
372 _CC.PlayEffect("laser").GetComponent<SpriteBasedLaser>().Play(_TP.PositionCenter());
373 }
374 else
375 {
376 Effect effect = Effect.Get("ranged_arrow")._Play(_CC.pos, _CC.isSynced ? _CC.renderer.position : _CC.pos.Position(), 0f, _TP, data.sprite);
377 if (isCane)
378 {
379 effect.sr.color = effColor;
380 }
381 }
382 if (data.eject)
383 {
384 if (!ignoreSound)
385 {
386 _CC.PlaySound("bullet_drop");
387 }
388 _CC.PlayEffect("bullet").Emit(1);
389 }
390 if (isGun)
391 {
392 if (isPCC)
393 {
394 _weapon.PlayEffect(data.idEffect.IsEmpty("gunfire"), useRenderPos: true, 0f, firePos);
395 }
396 else
397 {
398 _CC.PlayEffect(data.idEffect.IsEmpty("gunfire"));
399 }
400 }
401 if (!ignoreSound)
402 {
403 _CC.PlaySound(data.idSound.IsEmpty("attack_gun"));
404 }
405 }
406 });
407 }
408 }
bool ignoreAttackSound
Point posRangedAnime
virtual int currentDir
Definition: CardActor.cs:41
CardActor actor
Definition: CardRenderer.cs:11
CardRenderer renderer
Definition: Card.cs:59
Zone currentZone
Definition: Chara.cs:253
UD_String_Color elementColors
static ColorProfile Colors
Definition: EClass.cs:38
static Zone _zone
Definition: EClass.cs:20
static GameSetting setting
Definition: EClass.cs:34
UD_String_EffectData guns
Definition: GameSetting.cs:276
EffectSetting effect
Definition: GameSetting.cs:299
Definition: Point.cs:9
Point Copy()
Definition: Point.cs:479
Definition: Thing.cs:8
Card owner
Definition: Trait.cs:27
bool TryGetValue(TKey key, out TValue value)
Definition: UDictionary.cs:178
Definition: Zone.cs:12

References Effect._Play(), EClass._zone, CardRenderer.actor, CC, Color, EClass.Colors, Point.Copy(), EClass.core, CardActor.currentDir, Chara.currentZone, GameSetting.EffectData.delay, ElementContainer.dict, GameSetting.effect, GameSetting.EffectData.eject, ColorProfile.elementColors, Card.elements, Effect.Emit(), GameSetting.EffectData.firePos, Effect.Get(), GameSetting.EffectSetting.guns, CardRenderer.hasActor, Card.id, GameSetting.EffectData.idEffect, GameSetting.EffectData.idSound, ignoreAttackSound, Chara.IsAliveInCurrentZone, Core.IsGameStarted, Chara.isSynced, numFire, Trait.owner, Card.PlayEffect(), Card.PlaySound(), Card.pos, CardRenderer.position, Point.Position(), Point.PositionCenter(), posRangedAnime, Card.renderer, EClass.setting, Element.source, GameSetting.EffectData.sprite, toolRange, UDictionary< TKey, TValue >.TryGetValue(), and weapon.

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

◆ Prepare()

void AttackProcess.Prepare ( Chara  _CC,
Thing  _weapon,
Card  _TC = null,
Point  _TP = null,
int  _attackIndex = 0,
bool  _isThrow = false 
)
inline

Definition at line 127 of file AttackProcess.cs.

128 {
129 CC = _CC;
130 TC = _TC;
131 TP = _TP;
132 isThrow = _isThrow;
133 weapon = _weapon;
134 ammo = _weapon?.ammoData;
135 hit = (crit = (critFury = (evadePlus = false)));
137 attackType = AttackType.Slash;
138 attackStyle = AttackStyle.Default;
139 evasion = 0;
140 penetration = 0;
141 distMod = 100;
142 attackIndex = _attackIndex;
144 ignoreAnime = (ignoreAttackSound = false);
145 if (!isThrow)
146 {
147 if (!IsRanged)
148 {
150 }
151 else if (TP != null)
152 {
153 int num = CC.pos.Distance(TP);
154 distMod = Mathf.Max(115 - 10 * Mathf.Abs(num - toolRange.BestDist) * 100 / (100 + weapon.Evalue(605) * 10), 80);
155 }
156 }
157 if (isThrow)
158 {
159 bool flag = weapon.HasTag(CTAG.throwWeapon) || weapon.HasTag(CTAG.throwWeaponEnemy);
160 int num2 = (int)Mathf.Clamp(Mathf.Sqrt(weapon.SelfWeight + weapon.ChildrenWeight) * 3f + 25f + (float)(flag ? 75 : 0), 10f, 400f + Mathf.Sqrt(CC.STR) * 50f);
161 int num3 = Mathf.Clamp(weapon.material.hardness, flag ? 40 : 20, 200);
163 attackType = AttackType.Blunt;
164 dBonus = CC.DMG + (CC.IsPCParty ? 3 : 7) + Math.Min(weapon.encLV, 99);
165 dNum = 2;
166 dDim = (((!CC.IsPCParty) ? CC.LV : 0) + CC.STR + CC.Evalue(108)) * num2 / 100 * num3 / 100 / 2;
167 dMulti = 1f;
168 toHitBase = EClass.curve(CC.DEX / 4 + CC.STR / 2 + weaponSkill.Value, 50, 25) + (CC.IsPCFaction ? 75 : 250);
169 toHitFix = CC.HIT + weapon.HIT;
170 penetration = 25;
171 }
172 else if (IsMartial || IsMartialWeapon)
173 {
175 bool flag2 = weapon != null && weapon.Evalue(482) > 0;
176 if (flag2)
177 {
179 }
180 attackType = ((!CC.race.meleeStyle.IsEmpty()) ? CC.race.meleeStyle.ToEnum<AttackType>() : ((EClass.rnd(2) == 0) ? AttackType.Kick : AttackType.Punch));
181 dBonus = CC.DMG + CC.encLV + (int)Mathf.Sqrt(Mathf.Max(0, weaponSkill.GetParent(CC).Value / 5 + weaponSkill.Value / 4));
182 dNum = 2 + Mathf.Min(weaponSkill.Value / 10, 4);
183 dDim = 5 + (int)Mathf.Sqrt(Mathf.Max(0, weaponSkill.Value / 3));
184 dMulti = 0.6f + (float)(weaponSkill.GetParent(CC).Value / 2 + weaponSkill.Value / 2 + CC.Evalue(flag2 ? 304 : 132) / 2) / 50f;
185 dMulti += 0.05f * (float)CC.Evalue(1400);
187 toHitFix = CC.HIT;
188 if (attackStyle == AttackStyle.Shield)
189 {
190 toHitBase = toHitBase * 75 / 100;
191 }
192 penetration = Mathf.Clamp(weaponSkill.Value / 10 + 5, 5, 20) + CC.Evalue(92);
193 if (IsMartialWeapon)
194 {
195 dBonus += weapon.DMG;
196 dNum += weapon.source.offense[0];
197 dDim = Mathf.Max(dDim / 2 + weapon.c_diceDim, 1);
200 if (!weapon.source.attackType.IsEmpty())
201 {
202 attackType = weapon.source.attackType.ToEnum<AttackType>();
203 }
204 }
205 }
206 else
207 {
208 if (IsRanged)
209 {
211 }
212 else
213 {
215 }
216 if (!weapon.source.attackType.IsEmpty())
217 {
218 attackType = weapon.source.attackType.ToEnum<AttackType>();
219 }
220 bool flag3 = IsCane || weapon.Evalue(482) > 0;
221 if (flag3)
222 {
224 }
225 dBonus = CC.DMG + CC.encLV + weapon.DMG;
226 dNum = weapon.source.offense[0];
228 dMulti = 0.6f + (float)(weaponSkill.GetParent(CC).Value + weaponSkill.Value / 2 + CC.Evalue(flag3 ? 304 : (IsRanged ? 133 : 132))) / 50f;
229 dMulti += 0.05f * (float)CC.Evalue(IsRanged ? 1404 : 1400);
230 toHitBase = EClass.curve((IsCane ? CC.WIL : CC.DEX) / 4 + weaponSkill.GetParent(CC).Value / 3 + weaponSkill.Value, 50, 25) + 50;
231 toHitFix = CC.HIT + weapon.HIT;
232 penetration = weapon.Penetration + CC.Evalue(92);
233 if (IsCane)
234 {
235 toHitBase += 50;
236 }
237 }
238 if (ammo != null && !(ammo.trait is TraitAmmoTalisman))
239 {
240 dNumAmmo = ((ammo.source.offense.Length != 0) ? ammo.source.offense[0] : 0);
242 dBonusAmmo = ammo.DMG + ammo.encLV;
243 if (dNumAmmo < 1)
244 {
245 dNumAmmo = 1;
246 }
247 if (dDimAmmo < 1)
248 {
249 dDimAmmo = 1;
250 }
251 toHitFix += ammo.HIT;
252 }
253 else
254 {
255 dNumAmmo = 0;
256 dDimAmmo = 0;
257 }
258 if (dNum < 1)
259 {
260 dNum = 1;
261 }
262 if (dDim < 1)
263 {
264 dDim = 1;
265 }
266 if (penetration > 100)
267 {
268 penetration = 100;
269 }
270 if (attackStyle == AttackStyle.TwoHand)
271 {
272 dMulti = dMulti * 1.5f + 0.1f * Mathf.Sqrt(Mathf.Max(0, CC.Evalue(130)));
273 }
274 dMulti = dMulti * (float)distMod / 100f;
275 toHit = (toHitBase + toHitFix) * (100 + CC.Evalue(414)) / 100;
276 toHit = toHit * distMod / 100;
277 if (CC.HasCondition<ConBane>())
278 {
279 toHit = toHit * 75 / 100;
280 }
281 if (TC != null && CC.HasHigherGround(TC))
282 {
283 toHit = toHit * 120 / 100;
284 }
285 if (CC.ride != null)
286 {
287 toHit = toHit * 100 / (100 + 500 / Mathf.Max(5, 10 + CC.EvalueRiding()));
288 }
289 if (CC.parasite != null)
290 {
291 toHit = toHit * 100 / (100 + 1000 / Mathf.Max(5, 10 + CC.Evalue(227)));
292 }
293 if (CC.host != null)
294 {
295 if (CC.host.ride == CC)
296 {
297 toHit = toHit * 100 / (100 + 1000 / Mathf.Max(5, 10 + CC.STR));
298 }
299 if (CC.host.parasite == CC)
300 {
301 toHit = toHit * 100 / (100 + 2000 / Mathf.Max(5, 10 + CC.DEX));
302 }
303 }
304 if (attackStyle == AttackStyle.TwoHand)
305 {
306 toHit += 25 + (int)Mathf.Sqrt(Mathf.Max(0, CC.Evalue(130)) * 2);
307 }
308 else if (attackStyle == AttackStyle.TwoWield && toHit > 0)
309 {
310 toHit = toHit * 100 / (115 + attackIndex * 15 + attackIndex * Mathf.Clamp(2000 / (20 + CC.EvalueMax(131, -10)), 0, 100));
311 }
312 if (CC.isBlind)
313 {
314 toHit /= ((IsRanged || isThrow) ? 10 : 3);
315 }
317 {
318 toHit /= 2;
319 }
320 if (TC != null)
321 {
322 evasion = EClass.curve(TC.PER / 3 + TC.Evalue(150), 50, 10) + TC.DV + 25;
323 if (TC.isChara && TC.Chara.isBlind)
324 {
325 evasion /= 2;
326 }
327 if (TC.HasCondition<ConDim>())
328 {
329 evasion /= 2;
330 }
331 if (TC.isChara && TC.Chara.HasHigherGround(CC))
332 {
333 evasion = evasion * 120 / 100;
334 }
335 }
336 }
CTAG
Definition: CTAG.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
int DMG
Definition: Card.cs:2293
int EvalueMax(int ele, int min=0)
Definition: Card.cs:2547
int ChildrenWeight
Definition: Card.cs:1975
SourceMaterial.Row material
Definition: Card.cs:2013
int HIT
Definition: Card.cs:2291
Thing ammoData
Definition: Card.cs:1759
int WIL
Definition: Card.cs:2305
int STR
Definition: Card.cs:2295
bool HasTag(CTAG tag)
Definition: Card.cs:2557
int DEX
Definition: Card.cs:2297
int encLV
Definition: Card.cs:312
int c_diceDim
Definition: Card.cs:1363
SourceCategory.Row category
Definition: Card.cs:2011
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:433
Chara host
Definition: Chara.cs:33
int EvalueRiding()
Definition: Chara.cs:5827
bool HasHigherGround(Card c)
Definition: Chara.cs:1172
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
bool isBlind
Definition: Chara.cs:130
bool isConfused
Definition: Chara.cs:126
SourceRace.Row race
Definition: Chara.cs:462
Element GetOrCreateElement(Element ele)
Element GetParent(Card c)
Definition: ELEMENT.cs:520
int Distance(Point p)
Definition: Point.cs:969
SourceThing.Row source
Definition: Thing.cs:11
override int SelfWeight
Definition: Thing.cs:82
int Penetration
Definition: Thing.cs:34
virtual Element WeaponSkill

References ammo, Card.ammoData, attackIndex, attackStyle, attackType, TraitToolRange.BestDist, Chara.body, Card.c_diceDim, Card.category, CC, Card.ChildrenWeight, crit, critFury, EClass.curve(), dBonus, dBonusAmmo, dDim, dDimAmmo, Card.DEX, Point.Distance(), distMod, Card.DMG, dMulti, dNum, dNumAmmo, Card.elements, Card.encLV, evadePlus, Card.Evalue(), Card.EvalueMax(), Chara.EvalueRiding(), evasion, CharaBody.GetAttackStyle(), ElementContainer.GetOrCreateElement(), Element.GetParent(), Chara.HasCondition(), Chara.HasHigherGround(), Card.HasTag(), hit, Card.HIT, Chara.host, if(), ignoreAnime, ignoreAttackSound, Chara.isBlind, IsCane, Chara.isConfused, IsMartial, IsMartialWeapon, Chara.IsPCParty, IsRanged, isThrow, Card.LV, Card.material, Chara.parasite, penetration, Thing.Penetration, Card.pos, posRangedAnime, Chara.race, Chara.ride, EClass.rnd(), Thing.SelfWeight, Thing.source, Card.STR, toHit, toHitBase, toHitFix, toolRange, TP, Card.trait, Element.Value, weapon, weaponSkill, TraitToolRange.WeaponSkill, and Card.WIL.

Referenced by Thing.AddAttackEvaluation(), ActMelee.Attack(), ActRanged.Perform(), and ActThrow.Throw().

Member Data Documentation

◆ ammo

Thing AttackProcess.ammo

Definition at line 68 of file AttackProcess.cs.

Referenced by GetRawDamage(), Perform(), and Prepare().

◆ attackIndex

int AttackProcess.attackIndex

Definition at line 28 of file AttackProcess.cs.

Referenced by GetText(), and Prepare().

◆ attackStyle

AttackStyle AttackProcess.attackStyle

Definition at line 74 of file AttackProcess.cs.

Referenced by Perform(), and Prepare().

◆ attackType

AttackType AttackProcess.attackType

Definition at line 72 of file AttackProcess.cs.

Referenced by Perform(), and Prepare().

◆ CC

Chara AttackProcess.CC

Definition at line 56 of file AttackProcess.cs.

Referenced by CalcHit(), GetRawDamage(), GetWeaponEnc(), Perform(), PlayRangedAnime(), and Prepare().

◆ crit

bool AttackProcess.crit

Definition at line 42 of file AttackProcess.cs.

Referenced by CalcHit(), Crit(), GetRawDamage(), Perform(), and Prepare().

◆ critFury

bool AttackProcess.critFury

Definition at line 44 of file AttackProcess.cs.

Referenced by CalcHit(), Perform(), and Prepare().

◆ Current

AttackProcess AttackProcess.Current = new AttackProcess()
static

◆ dBonus

int AttackProcess.dBonus

Definition at line 14 of file AttackProcess.cs.

Referenced by GetRawDamage(), GetText(), and Prepare().

◆ dBonusAmmo

int AttackProcess.dBonusAmmo

Definition at line 34 of file AttackProcess.cs.

Referenced by GetRawDamage(), and Prepare().

◆ dDim

int AttackProcess.dDim

Definition at line 12 of file AttackProcess.cs.

Referenced by GetRawDamage(), GetText(), and Prepare().

◆ dDimAmmo

int AttackProcess.dDimAmmo

Definition at line 32 of file AttackProcess.cs.

Referenced by GetRawDamage(), and Prepare().

◆ distMod

int AttackProcess.distMod

Definition at line 26 of file AttackProcess.cs.

Referenced by Prepare().

◆ dMulti

float AttackProcess.dMulti

Definition at line 40 of file AttackProcess.cs.

Referenced by GetRawDamage(), GetText(), and Prepare().

◆ dNum

int AttackProcess.dNum

Definition at line 10 of file AttackProcess.cs.

Referenced by GetRawDamage(), GetText(), and Prepare().

◆ dNumAmmo

int AttackProcess.dNumAmmo

Definition at line 30 of file AttackProcess.cs.

Referenced by GetRawDamage(), and Prepare().

◆ evadePlus

bool AttackProcess.evadePlus

Definition at line 48 of file AttackProcess.cs.

Referenced by EvadePlus(), Perform(), and Prepare().

◆ evasion

int AttackProcess.evasion

Definition at line 22 of file AttackProcess.cs.

Referenced by CalcHit(), and Prepare().

◆ hit

bool AttackProcess.hit

Definition at line 46 of file AttackProcess.cs.

Referenced by Perform(), and Prepare().

◆ ignoreAnime

bool AttackProcess.ignoreAnime

Definition at line 52 of file AttackProcess.cs.

Referenced by Perform(), and Prepare().

◆ ignoreAttackSound

bool AttackProcess.ignoreAttackSound

Definition at line 54 of file AttackProcess.cs.

Referenced by PlayRangedAnime(), and Prepare().

◆ isThrow

bool AttackProcess.isThrow

Definition at line 50 of file AttackProcess.cs.

Referenced by Perform(), and Prepare().

◆ numFire

int AttackProcess.numFire

Definition at line 36 of file AttackProcess.cs.

Referenced by Perform(), and PlayRangedAnime().

◆ numFireWithoutDamageLoss

int AttackProcess.numFireWithoutDamageLoss

Definition at line 38 of file AttackProcess.cs.

Referenced by Perform().

◆ penetration

int AttackProcess.penetration

Definition at line 24 of file AttackProcess.cs.

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

◆ posRangedAnime

Point AttackProcess.posRangedAnime

Definition at line 62 of file AttackProcess.cs.

Referenced by PlayRangedAnime(), and Prepare().

◆ TC

Card AttackProcess.TC

Definition at line 58 of file AttackProcess.cs.

Referenced by Perform().

◆ toHit

int AttackProcess.toHit

Definition at line 16 of file AttackProcess.cs.

Referenced by CalcHit(), GetText(), and Prepare().

◆ toHitBase

int AttackProcess.toHitBase

Definition at line 18 of file AttackProcess.cs.

Referenced by Prepare().

◆ toHitFix

int AttackProcess.toHitFix

Definition at line 20 of file AttackProcess.cs.

Referenced by Prepare().

◆ toolRange

TraitToolRange AttackProcess.toolRange

Definition at line 70 of file AttackProcess.cs.

Referenced by Perform(), PlayRangedAnime(), and Prepare().

◆ TP

Point AttackProcess.TP

Definition at line 60 of file AttackProcess.cs.

Referenced by Prepare().

◆ weapon

Thing AttackProcess.weapon

Definition at line 66 of file AttackProcess.cs.

Referenced by CalcHit(), Perform(), PlayRangedAnime(), and Prepare().

◆ weaponSkill

Element AttackProcess.weaponSkill

Definition at line 64 of file AttackProcess.cs.

Referenced by Perform(), and Prepare().

Property Documentation

◆ IsCane

bool AttackProcess.IsCane
get

Definition at line 102 of file AttackProcess.cs.

103 {
104 get
105 {
106 if (IsRanged)
107 {
109 }
110 return false;
111 }
112 }

Referenced by Perform(), and Prepare().

◆ IsMartial

bool AttackProcess.IsMartial
get

Definition at line 76 of file AttackProcess.cs.

Referenced by GetRawDamage(), GetText(), and Prepare().

◆ IsMartialWeapon

bool AttackProcess.IsMartialWeapon
get

Definition at line 78 of file AttackProcess.cs.

79 {
80 get
81 {
82 if (weapon != null)
83 {
84 return weapon.category.skill == 100;
85 }
86 return false;
87 }
88 }

Referenced by GetRawDamage(), and Prepare().

◆ IsRanged

bool AttackProcess.IsRanged
get

Definition at line 90 of file AttackProcess.cs.

91 {
92 get
93 {
94 if (toolRange != null && !isThrow)
95 {
97 }
98 return false;
99 }
100 }
virtual Thing Thing
Definition: Card.cs:2020
bool isEquipped
Definition: Thing.cs:17

Referenced by CalcHit(), Perform(), and Prepare().


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