2using System.Collections.Generic;
34 public List<Chara>
charas =
new List<Chara>();
53 public override IEnumerable<Status>
Run()
65 bool canSeeLos =
false;
95 tc = (owner.enemy =
null);
100 tc = (owner.enemy =
null);
116 lostCount = ((!canSeeLos) ? (lostCount + 1) : 0);
148 CursorSystem.ignoreCount = 1;
172 owner.lastEmo =
Emo.angry;
180 owner.lastEmo =
Emo.angry;
195 bool haltSecondMove =
false;
217 yield
return Status.Running;
228 haltSecondMove =
true;
244 haltSecondMove =
true;
251 haltSecondMove =
true;
255 Debug.Log(
owner.
Name +
"/" + move +
"/" + haltSecondMove +
"/" + dist);
261 yield
return Status.Running;
271 yield
return Status.Running;
282 yield
return Status.Running;
292 yield
return Status.Running;
313 if (aiIdle ==
"stand" || aiIdle ==
"root")
321 yield
return Status.Running;
324 yield
return Status.Running;
331 owner.ride.enemy =
null;
335 owner.parasite.enemy =
null;
343 tc.ride.enemy =
null;
347 tc.parasite.enemy =
null;
407 Debug.Log(
"TryMove:" +
owner.
Name +
"/" + flag +
"/" + dist +
"/" + num);
412 public void AddAbility(
Act a,
int mod = 0,
int chance = 100,
bool aiPt =
false)
432 if (obj !=
null && obj.
id == ele)
449 if (obj !=
null && obj.
id == ele)
495 bool charaBuilt =
false;
507 ability.priority = 0;
521 if (flag5 && !(text ==
"melee") && !(text ==
"range") &&
EClass.
rnd(2) == 0)
534 if (member.
Evalue(418) < 0)
536 owner.enemy = (
tc = member);
586 float num3 = 100f - (float)(member2.
mana.
value * 100) / MathF.Max(1f, member2.
mana.
max);
587 if (num3 > (
float)num)
595 num = 100 - owner.mana.value * 100 / Mathf.Max(1,
owner.
mana.
max);
622 bool flag9 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >=
tactics.
source.taunt;
623 num = ((flag8 && !flag9) ? 100 : ((!flag8 && flag9) ? 100 : 0));
634 num -= (owner.IsPC ? 30 : 10);
638 num -= (owner.IsPC ? 50 : 10);
668 num -= (owner.IsPC ? 30 : 10);
672 num -= (owner.IsPC ? 50 : 10);
692 isHOT = text ==
"hot";
693 num = ForeachChara(ability, (
Chara c) => HealFactor(c), isFriendlyAbility:
true);
707 bool flag7 = text ==
"dot";
713 if (num > 0 && flag7)
729 bool flag6 = ability.act is
ActBolt;
734 GetNumEnemy(flag6 ? 6 : 5);
739 num = tactics.P_Spell - 20 + numEnemy * 10 + GetAttackMod(
act);
758 num = ForeachChara(ability, delegate(
Chara c)
762 }, isFriendlyAbility:
true);
784 num = ForeachChara(ability, delegate(
Chara c)
788 }, isFriendlyAbility:
false);
844 num = ((dist <= 1) ? 1000 : 0);
848 if (
EClass.
rnd(200) <= num && (!owner.IsPowerful || owner.hp < owner.MaxHP / 2))
857 if (s.
target ==
"Neighbor")
881 if (flag2 || isConfused || flag4)
892 if (isConfused || flag4)
902 ability.priority = num;
903 int HealFactor(
Chara c)
909 float num6 = (float)c.
hp / (
float)c.
MaxHP;
910 if (num6 > (isHOT ? 0.85f : 0.75f))
914 int num7 = tactics.P_Heal - (int)((
float)tactics.P_Heal * num6) + (isHOT ? 50 : 25);
929 else if (condition is
ConDim)
952 if (ability2.
act.
source.alias ==
"ActRanged")
969 if (isPCFaction && cost.
cost > 0)
1011 void BuildCharaList()
1022 if (chara2 !=
owner)
1033 int ForeachChara(
ItemAbility a, Func<Chara, int> func,
bool isFriendlyAbility)
1044 int num5 = func(chara3);
1047 if (isFriendlyAbility)
1060 if (chara3 !=
owner)
1078 int GetAttackMod(
Act a)
1109 void GetNumEnemy(
int radius)
1125 int GetNumNeutral(
int radius)
1127 if (numNeutral != -1)
virtual bool ShouldAllyAttack(Chara tg)
override string ToString()
Status DoGoto(Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
void SetTurbo(int mtp=-1)
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
override bool CanPerform()
virtual TargetType TargetType
virtual bool HaveLongPressAction
virtual bool CanPerform()
bool IsTargetHostileParty()
bool IsRestrainedResident
bool HasElement(int ele, int req=1)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
void ShowEmo(Emo _emo=Emo.none, float duration=0f, bool skipSame=true)
bool HasEditorTag(EditorTag tag)
void ModExp(string alias, int a)
int ResistLvFrom(int ele)
void Say(string lang, string ref1=null, string ref2=null)
bool UseAbility(string idAct, Card tc=null, Point pos=null, bool pt=false)
Hostility OriginalHostility
MoveResult TryMoveFrom(Point p)
Element GetBuffStats(string alias)
Point GetFirstStep(Point newPoint, PathManager.MoveType moveType=PathManager.MoveType.Default)
bool CanSeeLos(Card c, int dist=-1)
override string ToString()
List< Condition > conditions
bool HasCondition(string alias)
override bool IsPCFaction
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
override bool IsPCFactionMinion
bool CanBeTempAlly(Chara c)
MoveResult TryMoveTowards(Point p)
bool FindNearestNewEnemy()
Chara SetEnemy(Chara c=null)
void TrySetEnemy(Chara c)
static CursorInfo IconMelee
static SourceManager sources
static Element Create(int id, int v=0)
virtual Act.Cost GetCost(Chara c)
ConfigAutoCombat autoCombat
virtual bool TryUseRanged(int dist)
override IEnumerable< Status > Run()
virtual bool TryThrow(int dist)
virtual void BuildAbilityList()
void TryRemoveAbility(int ele)
virtual bool TryAbortCombat()
override bool CancelOnAggro
List< ItemAbility > abilities
virtual bool TryUseAbility(int dist, bool beforeMove=false)
override CursorInfo CursorIcon
override bool CancelWhenDamaged
void TryAddAbility(int ele)
override bool CanManualCancel()
void AddAbility(Act a, int mod=0, int chance=100, bool aiPt=false)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
virtual TargetRange Range
void SetBGM(List< int > ids, bool refresh=true)
int CountMinions(Chara c)