9 public override string GetText(
string str =
"")
11 string[] list = Lang.GetList(
"fur");
12 string str2 = list[Mathf.Clamp(this.target.c_fur / 10, 0, list.Length - 1)];
13 return "AI_Shear".lang() +
"(" + str2 +
")";
17 public override bool IsValidTC(
Card c)
19 return c !=
null && c.CanBeSheared();
23 public override bool Perform()
26 return base.Perform();
30 public override IEnumerable<
AIAct.Status> Run()
32 yield
return base.DoGoto(this.target,
null);
33 int furLv = Mathf.Clamp(this.target.c_fur / 10 + 1, 1, 5);
36 canProgress = (() => this.IsValidTC(this.target)),
37 onProgressBegin = delegate()
39 this.owner.Say(
"shear_start", this.owner, this.target,
null,
null);
42 this.owner.Talk(
"goodBoy",
null,
null,
false);
47 this.owner.LookAt(this.target);
48 this.owner.PlaySound(
"shear", 1f,
true);
49 this.target.renderer.PlayAnime(AnimeID.Shiver,
default(Vector3),
false);
50 if (this.owner.Dist(
this.target) > 1)
52 EClass.pc.TryMoveTowards(this.target.pos);
53 if (this.owner ==
null)
58 if (this.owner.Dist(
this.target) > 1)
60 EClass.pc.Say(
"targetTooFar",
null,
null);
66 onProgressComplete = delegate()
69 string idMat =
"wool";
70 string id2 = this.target.id;
71 if (!(id2 ==
"putty_snow"))
73 if (!(id2 ==
"putty_snow_gold"))
75 if (!this.target.Chara.race.fur.IsEmpty())
77 string[] array = this.target.Chara.race.fur.Split(
'/', StringSplitOptions.None);
92 int num = 100 * furLv + furLv * furLv * 10;
93 int num2 = this.target.LV;
94 if (this.target.Chara.IsInCombat ||
this.target.Chara.IsMinion)
96 this.owner.Say(
"shear_penalty",
null,
null);
100 int num3 = 20 + thing.material.tier * 20;
101 thing.SetNum(Mathf.Max(num / num3, 1) +
EClass.rnd(furLv + 1));
102 thing.SetEncLv(
EClass.curve(num2, 30, 10, 75) / 10);
103 thing.elements.ModBase(2,
EClass.curve(num2 / 10 * 10, 30, 10, 75));
104 this.target.c_fur = -5;
105 this.owner.Say(
"shear_end", this.owner, this.target, thing.Name,
null);
106 this.owner.Pick(thing,
false,
true);
107 this.owner.elements.ModExp(237, 50,
false);
108 EClass.pc.stamina.Mod(-1);
109 this.target.Chara.ModAffinity(this.owner, 1,
true);
111 }.SetDuration((6 + furLv * 6) * 100 / (100 + this.owner.Tool.material.hardness * 2), 3);
112 yield
return base.Do(seq,
null);