8 public virtual EffectId IdEffect
12 return (base.GetParam(1,
null) ??
"Drink").ToEnum(
true);
18 public virtual int Power
22 if (base.GetParam(2,
null) ==
null)
26 return base.GetParam(2,
null).ToInt();
32 public virtual int IdEle
36 if (!this.AliasEle.IsEmpty())
38 return EClass.sources.elements.alias[this.AliasEle].id;
46 public virtual string AliasEle
56 public virtual string N1
60 return base.GetParam(3,
null);
66 public virtual bool IsNeg
70 return this.owner.HasTag(CTAG.neg);
76 public override bool IsThrowMainAction
86 public override ThrowType ThrowType
90 return ThrowType.Potion;
95 public override bool CanDrink(
Chara c)
102 public override bool IsBlendBase
106 return this.IsBlend();
111 public bool IsBlend()
113 EffectId idEffect = this.IdEffect;
114 if (idEffect <= EffectId.Poison)
116 if (idEffect != EffectId.DrinkWater && idEffect != EffectId.Poison)
121 else if (idEffect != EffectId.Love && idEffect != EffectId.Acidproof)
129 public override bool CanBlend(
Thing t)
131 EffectId idEffect = this.IdEffect;
132 if (idEffect <= EffectId.Poison)
134 if (idEffect == EffectId.DrinkWater)
136 return t.category.ignoreBless != 1 && t.id !=
"water" && t.id !=
"bucket";
138 if (idEffect != EffectId.Poison)
143 else if (idEffect != EffectId.Love)
145 if (idEffect != EffectId.Acidproof)
149 return !t.isAcidproof && t.IsEquipmentOrRanged;
155 public override void OnBlend(
Thing t,
Chara c)
157 EffectId idEffect = this.IdEffect;
158 if (idEffect <= EffectId.Poison)
160 if (idEffect != EffectId.DrinkWater)
162 if (idEffect == EffectId.Poison)
169 BlessedState blessedState = this.owner.blessedState;
171 if (blessedState >= BlessedState.Blessed)
173 Msg.Say(
"waterBless", t,
null,
null,
null);
174 t.SetBlessedState(BlessedState.Blessed);
175 c.Pick(t,
true,
true);
177 else if (blessedState <= BlessedState.Cursed)
179 Msg.Say(
"waterCurse", t,
null,
null,
null);
180 t.SetBlessedState(BlessedState.Cursed);
181 c.Pick(t,
true,
true);
185 Msg.SayNothingHappen();
189 else if (idEffect != EffectId.Love)
191 if (idEffect == EffectId.Acidproof)
193 c.Say(
"coated", t, c,
null,
null);
194 if (t.IsEquipment &&
this.owner.blessedState <= BlessedState.Cursed)
196 c.Say(
"blend_curse", t,
null,
null);
201 t.isAcidproof =
true;
209 this.owner.ModNum(-1,
true);
213 public static void BlendLove(
Chara c,
Thing t,
bool dream =
false)
215 Msg.Say(
"blend_love", t,
null,
null,
null);
216 Thing thing = t.Split(1);
217 thing.elements.ModBase(dream ? 704 : 703, t.IsBlessed ? 15 : (t.IsCursed ? 5 : 10));
218 c.Pick(thing,
true,
true);
222 public static void BlendPoison(
Chara c,
Thing t)
224 Msg.Say(
"blend_poison", t,
null,
null,
null);
225 Thing thing = t.Split(1);
226 thing.elements.ModBase(702, t.IsBlessed ? 5 : (t.IsCursed ? 15 : 10));
227 c.Pick(thing,
true,
true);
231 public override void OnDrink(
Chara c)
233 ActEffect.Proc(this.IdEffect, this.Power, this.owner.blessedState, c,
null,
new ActRef
236 isPerfume = (this is TraitPerfume)
241 public override void OnThrowGround(
Chara c,
Point p)
243 if (this.IdEffect != EffectId.Drink)
245 bool isHostileAct = c.IsPCParty && this.IsNeg;
249 idEffect = this.IdEffect,
252 isHostileAct = isHostileAct,
253 color = BaseTileMap.GetColorInt(this.owner.GetRandomColor(), this.owner.sourceRenderCard.colorMod),
256 isBlessed = (this.owner.blessedState >= BlessedState.Blessed),
257 isCursed = (this.owner.blessedState <= BlessedState.Cursed)
261 EClass._map.SetLiquid(p.x, p.z, 1, 3);
265 public override Action GetHealAction(
Chara c)
267 if (this.IdEffect == EffectId.Heal)