1using System.Collections.Generic;
54 return base.GetTextSmall(c);
94 return base.CanPerform();
99 Act.CurrentAct =
this;
101 Act.CurrentAct =
null;
107 Act.CC.combatCount = 10;
123 })).GetValueOrDefault();
126 if (effect !=
null && effect.
id == 6 &&
EClass.
rnd(2) == 0)
133 bool hasMissed =
false;
134 bool usedWeapon =
false;
135 bool usedTalisman =
false;
143 bool parried =
false;
164 if (orgTC.isChara && orgTC.ExistsOnMap && orgTC != cC && !orgTC.IsRestrainedResident &&
ACT.
Melee.
CanPerform(orgTC.Chara, cC))
170 else if (
AllowCounter && hasMissed && !cC.HasElement(439) && orgTC.HasElement(380))
172 orgTC.Say((orgTC.isChara && orgTC.Chara.IsHostile()) ?
"counter_enemy" :
"counter");
207 if (!
UseWeaponDist || dist <= 1 || dist <= num || intercepted)
209 int num2 = GetWeaponEnc(606, addSelfEnc:
false);
210 int scatter = GetWeaponEnc(607, addSelfEnc:
false);
211 splash = GetWeaponEnc(608, addSelfEnc:
true);
212 chaser = GetWeaponEnc(620, addSelfEnc:
true);
213 flurry = GetWeaponEnc(621, addSelfEnc:
true);
214 frustration = GetWeaponEnc(624, addSelfEnc:
true);
215 int num3 = GetWeaponEnc(622, addSelfEnc:
true);
216 feint = GetWeaponEnc(623, addSelfEnc:
true);
217 knockback = GetWeaponEnc(603, addSelfEnc:
true);
218 mod_talisman = GetWeaponEnc(609, addSelfEnc:
true);
228 num2 = (scatter = (splash = (num3 = 0)));
236 AttackWithFlurry(
Act.
TC,
Act.
TP, 1f, subAttack:
false);
243 if (!
item.Equals(orgPos))
248 AttackWithFlurry(firstChara,
item, 1f, subAttack:
false);
253 else if (scatter > 0)
259 Chara firstChara2 = p.FirstChara;
260 if (firstChara2 != null && firstChara2.IsHostile(Act.CC))
262 AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true);
269 List<Point> list =
new List<Point>();
279 for (
int i = 0; i < 9 && num3 >
EClass.
rnd(10 + (
int)Mathf.Pow(3f, i + 2)); i++)
283 foreach (
Point item2
in list)
293 AttackWithFlurry(item3, item2, 1f, subAttack:
true);
329 num6 = num6 * 100 / (int)Mathf.Clamp((
float)AttackProcess.Current.weaponSkill.Value / (float)num7 * 100f, 50f, 150f);
342 for (
int j = 0; j < 10; j++)
344 if (chaser >
EClass.
rnd(4 + (
int)Mathf.Pow(4f, j + 2)))
351 for (
int k = 0; k < num8; k++)
366 if (!flag && frustration > 0 && !
Act.
TC.
HasElement(439) && 10f + 2f * Mathf.Sqrt(frustration) > (float)
EClass.
rnd(100))
368 AttackProcess.Current.critFury =
true;
370 AttackProcess.Current.critFury =
false;
390 TraitAmmo traitAmmo = ((w.ammoData ==
null) ?
null : (w.ammoData.trait as
TraitAmmo));
402 if (mod_talisman > 0 && Mathf.Min(10f + Mathf.Sqrt(mod_talisman) * 5f, 90f) > (
float)
EClass.
rnd(100))
415 if (w.ammoData !=
null)
417 w.ammoData.Num = w.c_ammo;
431 if (feint > 0 && 10f + 4f * Mathf.Sqrt(feint) > (float)
EClass.
rnd(100))
463 bool flag3 = Act.CC.id ==
"tsunami";
489 void AttackWithFlurry(
Card _tc,
Point _tp,
float mtp,
bool subAttack)
494 for (
int l = 0; l < 10 && flurry >
EClass.
rnd(25 + (
int)Mathf.Pow(5f, l + 2)); l++)
499 for (
int m = 0; m < num10; m++)
513 Attack(_tc, _tp, mtp, subAttack);
520 int GetWeaponEnc(
int ele,
bool addSelfEnc)
static Act Create(int id)
virtual bool ShouldRollMax
override CursorInfo GetCursorIcon(Card c)
override bool CanPerform()
virtual bool AllowCounter
override string GetTextSmall(Card c)
override bool CanPressRepeat
override string GetHintText(string str="")
bool Attack(float dmgMulti=1f)
override int PerformDistance
virtual bool UseWeaponDist
override bool ShowMouseHint(Card c)
static bool TryReload(Thing weapon, Thing ammo=null)
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
int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
static int GetWeaponEnc(Chara CC, Thing w, int ele, bool addSelfEnc=false)
void PlayAnime(AnimeID id, bool force)
virtual void SetFirst(bool first, Vector3 pos)
ElementContainerCard elements
bool IsRestrainedResident
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
bool HasElement(int ele, int req=1)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
virtual int ApplyProtection(int dmg, int mod=100)
virtual bool IsAliveInCurrentZone
void ModExp(string alias, int a)
SourceCategory.Row category
void Say(string lang, string ref1=null, string ref2=null)
override bool IsAliveInCurrentZone
MoveResult TryMoveFrom(Point p)
Condition AddCondition(string id, int p=100, bool force=false)
bool CanSeeLos(Card c, int dist=-1)
bool RequestProtection(Chara attacker, Action< Chara > action)
bool HasCondition(string alias)
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
bool CanInteractTo(Card c)
void DoHostileAction(Card _tg, bool immediate=false)
override void LookAt(Card c)
static CursorInfo IconMelee
static int curve(int a, int start, int step, int rate=75)
static void Wait(float a, Card c)
int GetSpellExp(Chara c, Element e, int costMod=100)
Element GetElement(string alias)
static void SetDirty(Thing t)
List< Point > ListPointsInLine(Point center, Point to, int radius)
List< Card > ListCards(bool includeMasked=false)
Point Set(int _x, int _z)
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
bool Equals(int _x, int _z)
Effect PlayEffect(string id)
void Animate(AnimeID id, bool animeBlock=false)
virtual bool CanBeAttacked