2using System.Collections.Generic;
34 public List<Chara>
charas =
new List<Chara>();
49 public override IEnumerable<Status>
Run()
61 bool canSeeLos =
false;
91 tc = (owner.enemy =
null);
96 tc = (owner.enemy =
null);
112 lostCount = ((!canSeeLos) ? (lostCount + 1) : 0);
144 CursorSystem.ignoreCount = 1;
168 owner.lastEmo =
Emo.angry;
176 owner.lastEmo =
Emo.angry;
191 bool haltSecondMove =
false;
213 yield
return Status.Running;
224 haltSecondMove =
true;
240 haltSecondMove =
true;
247 haltSecondMove =
true;
251 Debug.Log(
owner.
Name +
"/" + move +
"/" + haltSecondMove +
"/" + dist);
257 yield
return Status.Running;
267 yield
return Status.Running;
278 yield
return Status.Running;
288 yield
return Status.Running;
309 if (aiIdle ==
"stand" || aiIdle ==
"root")
317 yield
return Status.Running;
320 yield
return Status.Running;
327 owner.ride.enemy =
null;
331 owner.parasite.enemy =
null;
339 tc.ride.enemy =
null;
343 tc.parasite.enemy =
null;
403 Debug.Log(
"TryMove:" +
owner.
Name +
"/" + flag +
"/" + dist +
"/" + num);
408 public void AddAbility(
Act a,
int mod = 0,
int chance = 100,
bool aiPt =
false)
457 bool charaBuilt =
false;
469 ability.priority = 0;
483 if (flag5 && !(text ==
"melee") && !(text ==
"range") &&
EClass.
rnd(2) == 0)
531 bool flag7 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >=
tactics.
source.taunt;
532 num = ((flag6 && !flag7) ? 100 : ((!flag6 && flag7) ? 100 : 0));
543 num -= (owner.IsPC ? 30 : 10);
547 num -= (owner.IsPC ? 50 : 10);
577 num -= (owner.IsPC ? 30 : 10);
581 num -= (owner.IsPC ? 50 : 10);
596 isHOT = text ==
"hot";
597 num = ForeachChara(ability, (
Chara c) => HealFactor(c), isFriendlyAbility:
true);
611 bool flag8 = text ==
"dot";
617 if (num > 0 && flag8)
633 bool flag9 = ability.act is
ActBolt;
638 GetNumEnemy(flag9 ? 6 : 5);
643 num = tactics.P_Spell - 20 + numEnemy * 10 + GetAttackMod(
act);
654 num = ForeachChara(ability, delegate(
Chara c)
658 }, isFriendlyAbility:
true);
680 num = ForeachChara(ability, delegate(
Chara c)
684 }, isFriendlyAbility:
false);
740 num = ((dist <= 1) ? 1000 : 0);
753 if (s.
target ==
"Neighbor")
777 if (flag2 || isConfused || flag4)
788 if (isConfused || flag4)
798 ability.priority = num;
799 int HealFactor(
Chara c)
805 float num3 = (float)c.
hp / (
float)c.
MaxHP;
806 if (num3 > (isHOT ? 0.85f : 0.75f))
810 int num4 = tactics.P_Heal - (int)((
float)tactics.P_Heal * num3) + (isHOT ? 50 : 25);
825 else if (condition is
ConDim)
848 if (ability2.
act.
source.alias ==
"ActRanged")
865 if (isPCFaction && cost.
cost > 0)
907 void BuildCharaList()
929 int ForeachChara(
ItemAbility a, Func<Chara, int> func,
bool isFriendlyAbility)
940 int num9 = func(chara3);
943 if (isFriendlyAbility)
974 int GetAttackMod(
Act a)
1005 void GetNumEnemy(
int radius)
1021 int GetNumNeutral(
int radius)
1023 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
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()
virtual bool TryAbortCombat()
override bool CancelOnAggro
List< ItemAbility > abilities
virtual bool TryUseAbility(int dist, bool beforeMove=false)
override CursorInfo CursorIcon
override bool CancelWhenDamaged
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)