274 public override bool ShowProgress
284 public override int MaxProgress
294 public override int LeftHand
304 public override int RightHand
313 public override void OnStart()
319 this.owner.PlaySound(
"fish_cast", 1f,
true);
320 if (this.owner.Tool !=
null)
322 this.owner.Say(
"fish_start", this.owner, this.owner.Tool,
null,
null);
325 this.owner.Say(
"fish_start2", this.owner,
null,
null);
329 public override void OnProgress()
331 if (this.owner.IsPC && (
this.owner.Tool ==
null || !
this.owner.Tool.HasElement(245, 1)))
338 this.owner.renderer.PlayAnime(AnimeID.Fishing,
default(Vector3),
false);
339 this.owner.PlaySound(
"fish_fight", 1f,
true);
341 int a = Mathf.Clamp(10 -
EClass.rnd(
this.owner.Evalue(245) + 1) / 10, 5, 10);
342 if (this.hit >
EClass.rnd(a))
345 this.progress = this.MaxProgress;
350 if (
EClass.rnd(Mathf.Clamp(10 -
EClass.rnd(
this.owner.Evalue(245) + 1) / 5, 2, 10)) == 0 &&
this.progress >= 10)
354 if (this.progress == 2 || (this.progress >= 8 && this.progress % 6 == 0 &&
EClass.rnd(3) == 0))
356 this.owner.renderer.PlayAnime(AnimeID.Shiver,
default(Vector3),
false);
364 if (this.posWater !=
null)
366 Effect.Get(
"ripple").Play(this.posWater, -0.04f,
null,
null);
367 this.posWater.PlaySound(
"fish_splash",
true, 1f,
true);
372 public override void OnProgressComplete()
374 this.owner.renderer.PlayAnime(AnimeID.Fishing,
default(Vector3),
false);
380 if (this.owner.IsPC && !
EClass.debug.enable)
382 if (
EClass.player.eqBait ==
null ||
EClass.player.eqBait.isDestroyed)
387 EClass.player.eqBait.ModNum(-1,
true);
396 EClass._zone.AddCard(thing, this.owner.pos);
397 thing.renderer.PlayAnime(AnimeID.Jump,
default(Vector3),
false);
398 this.owner.Say(
"fish_get", this.owner, thing,
null,
null);
399 this.owner.PlaySound(
"fish_get", 1f,
true);
400 this.owner.elements.ModExp(245, 100,
false);
401 if (thing.id ==
"medal")
403 thing.isHidden =
false;
407 if (
EClass.game.config.preference.pickFish)
409 if (
StatsBurden.GetPhase((
EClass.pc.ChildrenWeight + thing.ChildrenAndSelfWeight) * 100 /
EClass.pc.WeightLimit) >= 3)
411 EClass.pc.Say(
"tooHeavy", thing,
null,
null);
412 AI_Fish.shouldCancel =
true;
416 this.owner.Pick(thing,
true,
true);
422 foreach (
Thing thing2
in this.owner.things.List((
Thing t) => t.source._origin ==
"fish",
false))
427 if (
EClass.rnd(2) == 0 || num > 1)
429 this.owner.stamina.Mod(-1 * num);
438 this.owner.Say(
"fish_miss", this.owner,
null,
null);
440 this.owner.stamina.Mod(-1);
447 public Point posWater;