L2Effect.java 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.model.effects;
  16. import java.util.ArrayList;
  17. import java.util.concurrent.ScheduledFuture;
  18. import java.util.concurrent.TimeUnit;
  19. import java.util.logging.Level;
  20. import java.util.logging.Logger;
  21. import com.l2jserver.gameserver.GameTimeController;
  22. import com.l2jserver.gameserver.ThreadPoolManager;
  23. import com.l2jserver.gameserver.datatables.SkillTable;
  24. import com.l2jserver.gameserver.model.ChanceCondition;
  25. import com.l2jserver.gameserver.model.IChanceSkillTrigger;
  26. import com.l2jserver.gameserver.model.actor.L2Character;
  27. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  28. import com.l2jserver.gameserver.model.actor.instance.L2ServitorInstance;
  29. import com.l2jserver.gameserver.model.skills.L2Skill;
  30. import com.l2jserver.gameserver.model.skills.L2SkillType;
  31. import com.l2jserver.gameserver.model.skills.funcs.Func;
  32. import com.l2jserver.gameserver.model.skills.funcs.FuncTemplate;
  33. import com.l2jserver.gameserver.model.skills.funcs.Lambda;
  34. import com.l2jserver.gameserver.model.stats.Env;
  35. import com.l2jserver.gameserver.network.SystemMessageId;
  36. import com.l2jserver.gameserver.network.serverpackets.AbnormalStatusUpdate;
  37. import com.l2jserver.gameserver.network.serverpackets.ExOlympiadSpelledInfo;
  38. import com.l2jserver.gameserver.network.serverpackets.MagicSkillLaunched;
  39. import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
  40. import com.l2jserver.gameserver.network.serverpackets.PartySpelled;
  41. import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
  42. /**
  43. * This class ...
  44. * @version $Revision: 1.1.2.1.2.12 $ $Date: 2005/04/11 10:06:07 $
  45. */
  46. public abstract class L2Effect implements IChanceSkillTrigger
  47. {
  48. protected static final Logger _log = Logger.getLogger(L2Effect.class.getName());
  49. private static final Func[] _emptyFunctionSet = new Func[0];
  50. // member _effector is the instance of L2Character that cast/used the spell/skill that is
  51. // causing this effect. Do not confuse with the instance of L2Character that
  52. // is being affected by this effect.
  53. private final L2Character _effector;
  54. // member _effected is the instance of L2Character that was affected
  55. // by this effect. Do not confuse with the instance of L2Character that
  56. // casted/used this effect.
  57. private final L2Character _effected;
  58. // the skill that was used.
  59. private final L2Skill _skill;
  60. private final boolean _isHerbEffect;
  61. // or the items that was used.
  62. // private final L2Item _item;
  63. // the value of an update
  64. private final Lambda _lambda;
  65. // the current state
  66. private EffectState _state;
  67. // period, seconds
  68. private final int _abnormalTime;
  69. protected int _periodStartTicks;
  70. protected int _periodFirstTime;
  71. private final EffectTemplate _template;
  72. // function templates
  73. private final FuncTemplate[] _funcTemplates;
  74. // initial count
  75. private final int _totalCount;
  76. // counter
  77. private int _count;
  78. // abnormal effect mask
  79. private final AbnormalEffect _abnormalEffect;
  80. // special effect mask
  81. private final AbnormalEffect[] _specialEffect;
  82. // event effect mask
  83. private final AbnormalEffect _eventEffect;
  84. // show icon
  85. private final boolean _icon;
  86. // is self effect?
  87. private boolean _isSelfEffect = false;
  88. // is passive effect?
  89. private boolean _isPassiveEffect = false;
  90. public boolean preventExitUpdate;
  91. protected final class EffectTask implements Runnable
  92. {
  93. @Override
  94. public void run()
  95. {
  96. try
  97. {
  98. _periodFirstTime = 0;
  99. _periodStartTicks = GameTimeController.getGameTicks();
  100. scheduleEffect();
  101. }
  102. catch (Exception e)
  103. {
  104. _log.log(Level.SEVERE, "", e);
  105. }
  106. }
  107. }
  108. private ScheduledFuture<?> _currentFuture;
  109. /** The Identifier of the stack group */
  110. private final String _abnormalType;
  111. /** The position of the effect in the stack group */
  112. private final byte _abnormalLvl;
  113. private boolean _inUse = false;
  114. private boolean _startConditionsCorrect = true;
  115. /**
  116. * For special behavior. See Formulas.calcEffectSuccess
  117. */
  118. private double _effectPower;
  119. private L2SkillType _effectSkillType;
  120. /**
  121. * <font color="FF0000"><b>WARNING: scheduleEffect no longer inside constructor</b></font><br>
  122. * So you must call it explicitly
  123. * @param env
  124. * @param template
  125. */
  126. protected L2Effect(Env env, EffectTemplate template)
  127. {
  128. _state = EffectState.CREATED;
  129. _skill = env.getSkill();
  130. // _item = env._item == null ? null : env._item.getItem();
  131. _template = template;
  132. _effected = env.getTarget();
  133. _effector = env.getCharacter();
  134. _lambda = template.lambda;
  135. _funcTemplates = template.funcTemplates;
  136. _count = template.counter;
  137. _totalCount = _count;
  138. // Support for retail herbs duration when _effected has a Summon
  139. int temp = template.abnormalTime;
  140. if (((_skill.getId() > 2277) && (_skill.getId() < 2286)) || ((_skill.getId() >= 2512) && (_skill.getId() <= 2514)))
  141. {
  142. if ((_effected instanceof L2ServitorInstance) || ((_effected instanceof L2PcInstance) && (((L2PcInstance) _effected).getPet() instanceof L2ServitorInstance)))
  143. {
  144. temp /= 2;
  145. }
  146. }
  147. if (env.isSkillMastery())
  148. {
  149. temp *= 2;
  150. }
  151. _abnormalTime = temp;
  152. _abnormalEffect = template.abnormalEffect;
  153. _specialEffect = template.specialEffect;
  154. _eventEffect = template.eventEffect;
  155. _abnormalType = template.abnormalType;
  156. _abnormalLvl = template.abnormalLvl;
  157. _periodStartTicks = GameTimeController.getGameTicks();
  158. _periodFirstTime = 0;
  159. _icon = template.icon;
  160. _effectPower = template.effectPower;
  161. _effectSkillType = template.effectType;
  162. _isHerbEffect = _skill.getName().contains("Herb");
  163. /*
  164. * Commented out by DrHouse: scheduleEffect can call onStart before effect is completly initialized on constructor (child classes constructor)
  165. */
  166. // scheduleEffect();
  167. }
  168. /**
  169. * Special constructor to "steal" buffs. Must be implemented on every child class that can be stolen.<br>
  170. * <br>
  171. * <font color="FF0000"><b>WARNING: scheduleEffect nolonger inside constructor</b></font> <br>
  172. * So you must call it explicitly
  173. * @param env
  174. * @param effect
  175. */
  176. protected L2Effect(Env env, L2Effect effect)
  177. {
  178. _template = effect._template;
  179. _state = EffectState.CREATED;
  180. _skill = env.getSkill();
  181. _effected = env.getTarget();
  182. _effector = env.getCharacter();
  183. _lambda = _template.lambda;
  184. _funcTemplates = _template.funcTemplates;
  185. _count = effect.getCount();
  186. _totalCount = _template.counter;
  187. _abnormalTime = _template.abnormalTime;
  188. _abnormalEffect = _template.abnormalEffect;
  189. _specialEffect = _template.specialEffect;
  190. _eventEffect = _template.eventEffect;
  191. _abnormalType = _template.abnormalType;
  192. _abnormalLvl = _template.abnormalLvl;
  193. _periodStartTicks = effect.getPeriodStartTicks();
  194. _periodFirstTime = effect.getTime();
  195. _icon = _template.icon;
  196. _isHerbEffect = _skill.getName().contains("Herb");
  197. /*
  198. * Commented out by DrHouse: scheduleEffect can call onStart before effect is completly initialized on constructor (child classes constructor)
  199. */
  200. // scheduleEffect();
  201. }
  202. public int getCount()
  203. {
  204. return _count;
  205. }
  206. public int getTotalCount()
  207. {
  208. return _totalCount;
  209. }
  210. public void setCount(int newcount)
  211. {
  212. _count = Math.min(newcount, _totalCount); // sanity check
  213. }
  214. public void setFirstTime(int newFirstTime)
  215. {
  216. _periodFirstTime = Math.min(newFirstTime, _abnormalTime);
  217. _periodStartTicks -= _periodFirstTime * GameTimeController.TICKS_PER_SECOND;
  218. }
  219. public boolean getShowIcon()
  220. {
  221. return _icon;
  222. }
  223. public int getAbnormalTime()
  224. {
  225. return _abnormalTime;
  226. }
  227. public int getTime()
  228. {
  229. return (GameTimeController.getGameTicks() - _periodStartTicks) / GameTimeController.TICKS_PER_SECOND;
  230. }
  231. /**
  232. * Returns the elapsed time of the task.
  233. * @return Time in seconds.
  234. */
  235. public int getTaskTime()
  236. {
  237. if (_count == _totalCount)
  238. {
  239. return 0;
  240. }
  241. return (Math.abs((_count - _totalCount) + 1) * _abnormalTime) + getTime() + 1;
  242. }
  243. public boolean getInUse()
  244. {
  245. return _inUse;
  246. }
  247. public boolean setInUse(boolean inUse)
  248. {
  249. _inUse = inUse;
  250. if (_inUse)
  251. {
  252. _startConditionsCorrect = onStart();
  253. }
  254. else
  255. {
  256. onExit();
  257. }
  258. return _startConditionsCorrect;
  259. }
  260. public String getAbnormalType()
  261. {
  262. return _abnormalType;
  263. }
  264. public byte getAbnormalLvl()
  265. {
  266. return _abnormalLvl;
  267. }
  268. public final L2Skill getSkill()
  269. {
  270. return _skill;
  271. }
  272. public final L2Character getEffector()
  273. {
  274. return _effector;
  275. }
  276. public final L2Character getEffected()
  277. {
  278. return _effected;
  279. }
  280. public boolean isSelfEffect()
  281. {
  282. return _isSelfEffect;
  283. }
  284. public void setSelfEffect()
  285. {
  286. _isSelfEffect = true;
  287. }
  288. public boolean isPassiveEffect()
  289. {
  290. return _isPassiveEffect;
  291. }
  292. public void setPassiveEffect()
  293. {
  294. _isPassiveEffect = true;
  295. }
  296. public boolean isHerbEffect()
  297. {
  298. return _isHerbEffect;
  299. }
  300. public final double calc()
  301. {
  302. Env env = new Env();
  303. env.setCharacter(_effector);
  304. env.setTarget(_effected);
  305. env.setSkill(_skill);
  306. return _lambda.calc(env);
  307. }
  308. private final synchronized void startEffectTask()
  309. {
  310. if (_abnormalTime > 0)
  311. {
  312. stopEffectTask();
  313. final int initialDelay = Math.max((_abnormalTime - _periodFirstTime) * 1000, 5);
  314. if (_count > 1)
  315. {
  316. _currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _abnormalTime * 1000);
  317. }
  318. else
  319. {
  320. _currentFuture = ThreadPoolManager.getInstance().scheduleEffect(new EffectTask(), initialDelay);
  321. }
  322. }
  323. if (_state == EffectState.ACTING)
  324. {
  325. if (isSeflEffectType())
  326. {
  327. _effector.addEffect(this);
  328. }
  329. else
  330. {
  331. _effected.addEffect(this);
  332. }
  333. }
  334. }
  335. /**
  336. * Stop the L2Effect task and send Server->Client update packet. <B><U> Actions</U> :</B> <li>Cancel the effect in the the abnormal effect map of the L2Character</li> <li>Stop the task of the L2Effect, remove it and update client magic icon</li>
  337. */
  338. public final void exit()
  339. {
  340. exit(false);
  341. }
  342. public final void exit(boolean preventUpdate)
  343. {
  344. preventExitUpdate = preventUpdate;
  345. _state = EffectState.FINISHING;
  346. scheduleEffect();
  347. }
  348. /**
  349. * Stop the task of the L2Effect, remove it and update client magic icon.<br>
  350. * <B><U>Actions</U>:</B>
  351. * <ul>
  352. * <li>Cancel the task</li>
  353. * <li>Stop and remove L2Effect from L2Character and update client magic icon</li>
  354. * </ul>
  355. */
  356. public final synchronized void stopEffectTask()
  357. {
  358. if (_currentFuture != null)
  359. {
  360. // Cancel the task
  361. _currentFuture.cancel(false);
  362. // ThreadPoolManager.getInstance().removeEffect(_currentTask);
  363. _currentFuture = null;
  364. if (isSeflEffectType() && (getEffector() != null))
  365. {
  366. getEffector().removeEffect(this);
  367. }
  368. else if (getEffected() != null)
  369. {
  370. getEffected().removeEffect(this);
  371. }
  372. }
  373. }
  374. /**
  375. * @return effect type
  376. */
  377. public abstract L2EffectType getEffectType();
  378. /**
  379. * Notify started
  380. * @return
  381. */
  382. public boolean onStart()
  383. {
  384. if (_abnormalEffect != AbnormalEffect.NULL)
  385. {
  386. getEffected().startAbnormalEffect(_abnormalEffect);
  387. }
  388. if (_specialEffect != null)
  389. {
  390. getEffected().startSpecialEffect(_specialEffect);
  391. }
  392. if ((_eventEffect != AbnormalEffect.NULL) && (getEffected() instanceof L2PcInstance))
  393. {
  394. getEffected().getActingPlayer().startEventEffect(_eventEffect);
  395. }
  396. return true;
  397. }
  398. /**
  399. * Cancel the effect in the the abnormal effect map of the effected L2Character.
  400. */
  401. public void onExit()
  402. {
  403. if (_abnormalEffect != AbnormalEffect.NULL)
  404. {
  405. getEffected().stopAbnormalEffect(_abnormalEffect);
  406. }
  407. if (_specialEffect != null)
  408. {
  409. getEffected().stopSpecialEffect(_specialEffect);
  410. }
  411. if ((_eventEffect != AbnormalEffect.NULL) && (getEffected() instanceof L2PcInstance))
  412. {
  413. getEffected().getActingPlayer().stopEventEffect(_eventEffect);
  414. }
  415. }
  416. /**
  417. * @return true for continuation of this effect
  418. */
  419. public abstract boolean onActionTime();
  420. public final void scheduleEffect()
  421. {
  422. switch (_state)
  423. {
  424. case CREATED:
  425. {
  426. _state = EffectState.ACTING;
  427. if (_skill.isPvpSkill() && _icon && (getEffected() instanceof L2PcInstance))
  428. {
  429. SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
  430. smsg.addSkillName(_skill);
  431. getEffected().sendPacket(smsg);
  432. }
  433. if (_abnormalTime != 0)
  434. {
  435. startEffectTask();
  436. return;
  437. }
  438. // effects not having count or period should start
  439. _startConditionsCorrect = onStart();
  440. }
  441. case ACTING:
  442. {
  443. if (_count > 0)
  444. {
  445. _count--;
  446. if (getInUse())
  447. { // effect has to be in use
  448. if (onActionTime() && _startConditionsCorrect && (_count > 0))
  449. {
  450. return; // false causes effect to finish right away
  451. }
  452. }
  453. else if (_count > 0)
  454. { // do not finish it yet, in case reactivated
  455. return;
  456. }
  457. }
  458. _state = EffectState.FINISHING;
  459. }
  460. case FINISHING:
  461. {
  462. // If the time left is equal to zero, send the message
  463. if ((_count == 0) && _icon && (getEffected() instanceof L2PcInstance))
  464. {
  465. SystemMessage smsg3 = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_WORN_OFF);
  466. smsg3.addSkillName(_skill);
  467. getEffected().sendPacket(smsg3);
  468. }
  469. // if task is null - stopEffectTask does not remove effect
  470. if ((_currentFuture == null) && (getEffected() != null))
  471. {
  472. getEffected().removeEffect(this);
  473. }
  474. // Stop the task of the L2Effect, remove it and update client magic icon
  475. stopEffectTask();
  476. // Cancel the effect in the the abnormal effect map of the L2Character
  477. if (getInUse() || !((_count > 1) || (_abnormalTime > 0)))
  478. {
  479. if (_startConditionsCorrect)
  480. {
  481. onExit();
  482. }
  483. }
  484. if (_skill.getAfterEffectId() > 0)
  485. {
  486. L2Skill skill = SkillTable.getInstance().getInfo(_skill.getAfterEffectId(), _skill.getAfterEffectLvl());
  487. if (skill != null)
  488. {
  489. getEffected().broadcastPacket(new MagicSkillUse(_effected, skill.getId(), skill.getLevel(), 0, 0));
  490. getEffected().broadcastPacket(new MagicSkillLaunched(_effected, skill.getId(), skill.getLevel()));
  491. skill.getEffects(getEffected(), getEffected());
  492. }
  493. }
  494. }
  495. }
  496. }
  497. public Func[] getStatFuncs()
  498. {
  499. if (_funcTemplates == null)
  500. {
  501. return _emptyFunctionSet;
  502. }
  503. final ArrayList<Func> funcs = new ArrayList<>(_funcTemplates.length);
  504. Env env = new Env();
  505. env.setCharacter(_effector);
  506. env.setTarget(_effected);
  507. env.setSkill(_skill);
  508. Func f;
  509. for (FuncTemplate t : _funcTemplates)
  510. {
  511. f = t.getFunc(env, this); // effect is owner
  512. if (f != null)
  513. {
  514. funcs.add(f);
  515. }
  516. }
  517. if (funcs.isEmpty())
  518. {
  519. return _emptyFunctionSet;
  520. }
  521. return funcs.toArray(new Func[funcs.size()]);
  522. }
  523. public final void addIcon(AbnormalStatusUpdate mi)
  524. {
  525. if (_state != EffectState.ACTING)
  526. {
  527. return;
  528. }
  529. final ScheduledFuture<?> future = _currentFuture;
  530. final L2Skill sk = getSkill();
  531. if (_totalCount > 1)
  532. {
  533. if (sk.isStatic())
  534. {
  535. mi.addEffect(sk.getDisplayId(), getLevel(), sk.getBuffDuration() - (getTaskTime() * 1000));
  536. }
  537. else
  538. {
  539. mi.addEffect(sk.getDisplayId(), getLevel(), -1);
  540. }
  541. }
  542. else if (future != null)
  543. {
  544. mi.addEffect(sk.getDisplayId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
  545. }
  546. else if (_abnormalTime == -1)
  547. {
  548. mi.addEffect(sk.getDisplayId(), getLevel(), _abnormalTime);
  549. }
  550. }
  551. public final void addPartySpelledIcon(PartySpelled ps)
  552. {
  553. if (_state != EffectState.ACTING)
  554. {
  555. return;
  556. }
  557. final ScheduledFuture<?> future = _currentFuture;
  558. final L2Skill sk = getSkill();
  559. if (future != null)
  560. {
  561. ps.addPartySpelledEffect(sk.getDisplayId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
  562. }
  563. else if (_abnormalTime == -1)
  564. {
  565. ps.addPartySpelledEffect(sk.getDisplayId(), getLevel(), _abnormalTime);
  566. }
  567. }
  568. public final void addOlympiadSpelledIcon(ExOlympiadSpelledInfo os)
  569. {
  570. if (_state != EffectState.ACTING)
  571. {
  572. return;
  573. }
  574. final ScheduledFuture<?> future = _currentFuture;
  575. final L2Skill sk = getSkill();
  576. if (future != null)
  577. {
  578. os.addEffect(sk.getDisplayId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
  579. }
  580. else if (_abnormalTime == -1)
  581. {
  582. os.addEffect(sk.getDisplayId(), getLevel(), _abnormalTime);
  583. }
  584. }
  585. public int getLevel()
  586. {
  587. return getSkill().getLevel();
  588. }
  589. public int getPeriodStartTicks()
  590. {
  591. return _periodStartTicks;
  592. }
  593. public EffectTemplate getEffectTemplate()
  594. {
  595. return _template;
  596. }
  597. public double getEffectPower()
  598. {
  599. return _effectPower;
  600. }
  601. public L2SkillType getSkillType()
  602. {
  603. return _effectSkillType;
  604. }
  605. public boolean canBeStolen()
  606. {
  607. if (!effectCanBeStolen() || (getEffectType() == L2EffectType.TRANSFORMATION) || getSkill().isPassive() || getSkill().isToggle() || getSkill().isDebuff() || getSkill().isHeroSkill() || getSkill().isGMSkill() || getSkill().isStatic() || !getSkill().canBeDispeled())
  608. {
  609. return false;
  610. }
  611. return true;
  612. }
  613. /**
  614. * @return {@code true} if effect itself can be stolen, {@code false} otherwise
  615. */
  616. protected boolean effectCanBeStolen()
  617. {
  618. return false;
  619. }
  620. /**
  621. * Return bit flag for current effect
  622. * @return int flag
  623. */
  624. public int getEffectFlags()
  625. {
  626. return 0;
  627. }
  628. @Override
  629. public String toString()
  630. {
  631. return "L2Effect [_skill=" + _skill + ", _state=" + _state + ", _period=" + _abnormalTime + "]";
  632. }
  633. public boolean isSeflEffectType()
  634. {
  635. return false;
  636. }
  637. public void decreaseForce()
  638. {
  639. }
  640. public void increaseEffect()
  641. {
  642. }
  643. public int getForceEffect()
  644. {
  645. return 0;
  646. }
  647. public boolean isBuffEffect()
  648. {
  649. return false;
  650. }
  651. public boolean isDebuffEffect()
  652. {
  653. return false;
  654. }
  655. @Override
  656. public boolean triggersChanceSkill()
  657. {
  658. return false;
  659. }
  660. @Override
  661. public int getTriggeredChanceId()
  662. {
  663. return 0;
  664. }
  665. @Override
  666. public int getTriggeredChanceLevel()
  667. {
  668. return 0;
  669. }
  670. @Override
  671. public ChanceCondition getTriggeredChanceCondition()
  672. {
  673. return null;
  674. }
  675. }