CardEffectInterfaces.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. #region "Target effect is negated" effect.
  5. public interface IDisableCardEffect
  6. {
  7. bool IsDisabled(ICardEffect cardEffect);
  8. }
  9. #endregion
  10. #region "Target permanent can not be selected by the effect" effect.
  11. public interface ICanNotSelectBySkillEffect
  12. {
  13. bool CanNotSelectBySkill(Permanent permanent, ICardEffect cardEffect);
  14. }
  15. #endregion
  16. #region "Target card cannot be played" effect.
  17. public interface ICanNotPlayCardEffect
  18. {
  19. bool CanNotPlay(CardSource cardSource);
  20. }
  21. #endregion
  22. #region "Ignore target card's color requirement" effect.
  23. public interface IIgnoreColorConditionEffect
  24. {
  25. bool IgnoreColorCondition(CardSource cardSource);
  26. }
  27. #endregion
  28. #region "Target permanent gains Iceclad" effect
  29. public interface IIcecladEffect
  30. {
  31. bool HasIceclad(Permanent permanent);
  32. }
  33. #endregion
  34. #region "Target permanent gains Rush" effect
  35. public interface IRushEffect
  36. {
  37. bool HasRush(Permanent permanent);
  38. }
  39. #endregion
  40. #region "Target permanent gains Reboot" effect
  41. public interface IRebootEffect
  42. {
  43. bool HasReboot(Permanent permanent);
  44. }
  45. #endregion
  46. #region "Target permanent gains Scapegoat" effect
  47. public interface IScapegoatEffect
  48. {
  49. bool HasScapegoat(Permanent permanent);
  50. }
  51. #endregion
  52. #region "Treat target permanent as Digimon" effect
  53. public interface ITreatAsDigimonEffect
  54. {
  55. bool IsDigimon(Permanent permanent);
  56. }
  57. #endregion
  58. #region "Change target card's colors" effect
  59. public interface IChangeCardColorEffect
  60. {
  61. List<CardColor> GetCardColors(List<CardColor> CardColors, CardSource cardSource);
  62. }
  63. #endregion
  64. #region "Change target card's origin colors" effect
  65. public interface IChangeBaseCardColorEffect
  66. {
  67. List<CardColor> GetBaseCardColors(List<CardColor> BaseCardColors, CardSource cardSource);
  68. }
  69. #endregion
  70. #region "Target card gains additional effects" effect
  71. public interface IAddSkillEffect
  72. {
  73. bool ShouldAddEffect(EffectTiming timing);
  74. List<ICardEffect> GetCardEffect(CardSource card, List<ICardEffect> GetCardEffects, EffectTiming timing);
  75. }
  76. #endregion
  77. #region Label additional text to appear in Permanent Details
  78. public interface IAddDetailEffect
  79. {
  80. bool PermanentCondition(Permanent permanent);
  81. string GetDetail();//Used to avoid any interactions already built in to effect name
  82. bool TriggerEffect();//Unused for now, but could be used to display something on the card to indicate it has gained an additional triggered effect, eg. [When Attacking] Lose 3 Memory
  83. }
  84. #endregion
  85. #region "Target card cannot be affected by effects" effect
  86. public interface ICanNotAffectedEffect
  87. {
  88. bool CanNotAffect(CardSource cardSource, ICardEffect cardEffect);
  89. }
  90. #endregion
  91. #region "Target card cannot be trashed from digivolution cards" effect
  92. public interface ICanNotTrashFromDigivolutionCardsEffect
  93. {
  94. bool CanNotTrashFromDigivolutionCards(CardSource cardSource, ICardEffect cardEffect);
  95. }
  96. #endregion
  97. #region "Change target permanent's Security Attack" effect
  98. public interface IChangeSAttackEffect
  99. {
  100. int GetSAttack(int SAttack, Permanent permanent, int invertValue);
  101. CalculateOrder isUpDown();
  102. bool PermanentCondition(Permanent permanent);
  103. }
  104. #endregion
  105. #region "Change target permanent's Link Max" effect
  106. public interface IChangeLinkMaxEffect
  107. {
  108. int GetLinkMax(int linkMax, Permanent permanent, int invertValue);
  109. CalculateOrder isUpDown();
  110. bool PermanentCondition(Permanent permanent);
  111. }
  112. #endregion
  113. #region "Invert target permanent's Security Attack" effect
  114. public interface IInvertSAttackEffect
  115. {
  116. int InversionValue(Permanent permanent, int invertValue);
  117. bool PermanentCondition(Permanent permanent);
  118. }
  119. #endregion
  120. #region "Change target card's card names" effect
  121. public interface IChangeCardNamesEffect
  122. {
  123. List<string> ChangeCardNames(List<string> CardNames, CardSource cardSource);
  124. }
  125. #endregion
  126. #region "Change target card's origin card names" effect
  127. public interface IChangeBaseCardNameEffect
  128. {
  129. List<string> ChangeBaseCardNames(List<string> BaseCardNames, CardSource cardSource);
  130. }
  131. #endregion
  132. #region "Change target card's card names for DigiXros" effect
  133. public interface IChangeCardNamesForDigiXrosEffect
  134. {
  135. List<string> ChangeCardNamesForDigiXros(List<string> CardNames, CardSource cardSource);
  136. }
  137. #endregion
  138. #region "Change target card's card level for Assembly" effect
  139. public interface IChangeCardLevelForAssemblyEffect
  140. {
  141. List<int> ChangeCardLevelForAssembly(List<int> levels, CardSource cardSource);
  142. }
  143. #endregion
  144. #region "Change target card's traits" effect
  145. public interface IChangeTraitsEffect
  146. {
  147. List<string> ChangTraits(List<string> Traits, CardSource cardSource);
  148. }
  149. #endregion
  150. #region "Target permanent cannot unsuspend" effect
  151. public interface ICanNotUnsuspendEffect
  152. {
  153. bool CanNotUnsuspend(Permanent permanent);
  154. }
  155. #endregion
  156. #region "Target permanent cannot suspend" effect
  157. public interface ICanNotSuspendEffect
  158. {
  159. bool CanNotSuspend(Permanent permanent);
  160. }
  161. #endregion
  162. #region "Target permanent cannot return to hand" effect
  163. public interface ICannotReturnToHandEffect
  164. {
  165. bool CannotReturnToHand(Permanent permanent, ICardEffect cardEffect);
  166. }
  167. #endregion
  168. #region "Target permanent cannot return to deck" effect
  169. public interface ICannotReturnToLibraryEffect
  170. {
  171. bool CannotReturnToLibrary(Permanent permanent, ICardEffect cardEffect);
  172. }
  173. #endregion
  174. #region "Target permanent cannot affected by DP minus effect" effect
  175. public interface IImmuneFromDPMinusEffect
  176. {
  177. bool ImmuneFromDPMinus(Permanent permanent, ICardEffect cardEffect);
  178. }
  179. #endregion
  180. #region "Target permanent cannot affected by De-Digivolve" effect
  181. public interface IImmuneFromDeDigivolveEffect
  182. {
  183. bool ImmuneDeDigivolve(Permanent permanent);
  184. }
  185. #endregion
  186. #region "Target permanent cannot have its stack cards trashed" effect
  187. public interface IImmuneFromStackTrashingEffect
  188. {
  189. bool ImmuneStackTrashing(Permanent permanent, ICardEffect effect);
  190. }
  191. #endregion
  192. #region "Target permanent does not have DP" effect
  193. public interface IDontHaveDPEffect
  194. {
  195. bool DontHaveDP(Permanent permanent);
  196. }
  197. #endregion
  198. #region "Change target permanent's DP" effect
  199. public interface IChangeDPEffect
  200. {
  201. int GetDP(int DP, Permanent permanent);
  202. bool PermanentCondition(Permanent permanent);
  203. bool IsUpDown();
  204. bool IsMinusDP();
  205. }
  206. #endregion
  207. #region "Change target permanent's origin DP" effect
  208. public interface IChangeBaseDPEffect
  209. {
  210. int GetDP(int DP, Permanent permanent);
  211. bool PermanentCondition(Permanent permanent);
  212. bool IsUpDown();
  213. bool IsMinusDP();
  214. }
  215. #endregion
  216. #region "Change target card's DP" effect
  217. public interface IChangeCardDPEffect
  218. {
  219. int GetDP(int DP, CardSource cardSource);
  220. bool CardCondition(CardSource cardSource);
  221. bool IsUpDown();
  222. bool IsMinusDP();
  223. }
  224. #endregion
  225. #region "Change target card's cost" effect
  226. public interface IChangeCostEffect
  227. {
  228. int GetCost(int cost, CardSource cardSource, SelectCardEffect.Root root, List<Permanent> targetPermanents);
  229. bool CardCondition(CardSource cardSource);
  230. bool IsUpDown();
  231. bool IsCheckAvailability();
  232. bool IsChangePayingCost();
  233. }
  234. #endregion
  235. #region "Change target card's cost" effect
  236. public interface IChangeLinkCostEffect
  237. {
  238. int GetCost(int cost, CardSource cardSource, Permanent permanent, SelectCardEffect.Root root);
  239. bool CardCondition(CardSource cardSource);
  240. bool PermanentCondition(Permanent permanent);
  241. bool IsUpDown();
  242. }
  243. #endregion
  244. #region "Change the maximum DP of DP-based deletion effect" effect
  245. public interface IChangeDPDeleteEffectMaxDPEffect
  246. {
  247. int GetMaxDP(int maxDP, ICardEffect cardEffect);
  248. }
  249. #endregion
  250. #region "Change target permanent's level" effect
  251. public interface IChangePermanentLevelEffect
  252. {
  253. int GetPermanentLevel(int level, Permanent permanent);
  254. }
  255. #endregion
  256. #region "Change target card's level" effect
  257. public interface IChangeCardLevelEffect
  258. {
  259. int GetCardLevel(int level, CardSource cardSource);
  260. }
  261. #endregion
  262. #region "Target attacking permanent can attack to target defending permanent" effect
  263. public interface ICanAttackTargetDefendingPermanentEffect
  264. {
  265. bool CanAttackTargetDefendingPermanent(Permanent Attacker, Permanent Defender, ICardEffect cardEffect);
  266. }
  267. #endregion
  268. #region "Target attacking permanent cannot attack to target defending permanent" effect
  269. public interface ICanNotAttackTargetDefendingPermanentEffect
  270. {
  271. bool CanNotAttackTargetDefendingPermanent(Permanent Attacker, Permanent Defender);
  272. }
  273. #endregion
  274. #region "Target Security Digimon card does not battle" effect
  275. public interface IDontBattleSecurityDigimonEffect
  276. {
  277. bool DontBattleSecurityDigimon(CardSource cardSource);
  278. }
  279. #endregion
  280. #region "Target defending permanent cannot block target attacking permanent" effect"
  281. public interface ICannotBlockEffect
  282. {
  283. bool CannotBlock(Permanent AttackingPermanent, Permanent BlockingPermanent);
  284. }
  285. #endregion
  286. #region "Target permanent gets additional digivolution condition" effect
  287. public interface IAddDigivolutionRequirementEffect
  288. {
  289. int GetEvoCost(Permanent permanent, CardSource cardSource, CardEffectCommons.IgnoreRequirement ignore, bool checkAvailability);
  290. }
  291. #endregion
  292. #region "Target player cannot gain Memory by effects" effect
  293. public interface ICannotAddMemoryEffect
  294. {
  295. bool cannotAddMemory(Player player, ICardEffect cardEffect);
  296. }
  297. #endregion
  298. #region "Target player cannot reduce digivolution costs" effect
  299. public interface ICannotReduceCostEffect
  300. {
  301. bool CannotReduceCost(Player player, List<Permanent> targetPermanents, CardSource cardSource);
  302. }
  303. #endregion
  304. #region "Target player cannot ignore digivolution condition" effect
  305. public interface ICannotIgnoreDigivolutionConditionEffect
  306. {
  307. bool cannotIgnoreDigivolutionCondition(Player player, Permanent targetPermanent, CardSource cardSource);
  308. }
  309. #endregion
  310. #region "Target player cannot add Security" effect
  311. public interface ICannotAddSecurityEffect
  312. {
  313. bool cannotAddSecurity(Player player, ICardEffect cardEffect);
  314. }
  315. #endregion
  316. #region "Target Digimon can be suspended by Digisorption" effect
  317. public interface ICanSuspendByDigisorptionEffect
  318. {
  319. bool canSuspendDigisorption(Permanent permanent, ICardEffect cardEffect);
  320. bool isCheckAvailability();
  321. }
  322. #endregion
  323. #region "Target permanent cannot digivolve into target card" effect"
  324. public interface ICanNotDigivolveEffect
  325. {
  326. bool CanNotEvolve(Permanent permanent, CardSource cardSource);
  327. }
  328. #endregion
  329. #region "Target card cannot be played as a new permanent" effect
  330. public interface ICanNotPutFieldEffect
  331. {
  332. bool CanNotPutField(CardSource cardSource, ICardEffect cardEffect);
  333. }
  334. #endregion
  335. #region "Target card cannot be moved" effect
  336. public interface ICanNotMoveEffect
  337. {
  338. bool CanNotMove(CardSource cardSource, ICardEffect cardEffect);
  339. }
  340. #endregion
  341. #region "Target card gains DNA digivolution conditions" effect
  342. public interface IAddJogressConditionEffect
  343. {
  344. JogressCondition GetJogressCondition(CardSource cardSource);
  345. }
  346. #endregion
  347. #region "Target card gains DigiXros conditions" effect
  348. public interface IAddDigiXrosConditionEffect
  349. {
  350. DigiXrosCondition GetDigiXrosCondition(CardSource cardSource);
  351. }
  352. #endregion
  353. #region "Target card gains Assembly conditions" effect
  354. public interface IAddAssemblyConditionEffect
  355. {
  356. AssemblyCondition GetAssemblyCondition(CardSource cardSource);
  357. }
  358. #endregion
  359. #region "Target card gains Burst digivolution conditions" effect
  360. public interface IAddBurstDigivolutionConditionEffect
  361. {
  362. BurstDigivolutionCondition GetBurstDigivolutionCondition(CardSource cardSource);
  363. }
  364. #endregion
  365. #region "Target card gains Link conditions" effect
  366. public interface IAddLinkConditionEffect
  367. {
  368. LinkCondition GetLinkCondition(CardSource cardSource);
  369. }
  370. #endregion
  371. #region "Target card gains App Fusion digivolution conditions" effect
  372. public interface IAddAppFusionConditionEffect
  373. {
  374. AppFusionCondition GetAppFusionCondition(CardSource cardSource);
  375. }
  376. #endregion
  377. #region "Add the maximum number of cards that can be selected from trash in DigiXros" effect
  378. public interface IAddMaxTrashCountDigiXrosEffect
  379. {
  380. int GetMaxTrashCount(CardSource cardSource);
  381. }
  382. #endregion
  383. #region "Add the maximum number of cards that can be selected from under Tamer in DigiXros" effect
  384. public interface IAddMaxUnderTamerCountDigiXrosEffect
  385. {
  386. int getMaxUnderTamerCount(CardSource cardSource);
  387. }
  388. #endregion
  389. #region "Target card be selected in DigiXros" effect
  390. public interface ICanSelectDigiXrosEffect
  391. {
  392. bool CanSelect(CardSource cardSource, Permanent permanent);
  393. }
  394. #endregion
  395. #region "Target card be selected in Assembly" effect
  396. public interface ICanSelectAssemblyEffect
  397. {
  398. bool CanSelect(CardSource cardSource, Permanent permanent);
  399. }
  400. #endregion
  401. #region "Target permanent's attack target cannot be switched" effect"
  402. public interface ICanNotSwitchAttackTargetEffect
  403. {
  404. bool CanNotBeSwitchAttackTarget(Permanent permanent);
  405. }
  406. #endregion
  407. #region "Target permanent cannot be deleted" effect"
  408. public interface ICanNotBeDestroyedEffect
  409. {
  410. bool CanNotBeDestroyed(Permanent permanent);
  411. }
  412. #endregion
  413. #region "Target permanent cannot be deleted by battle" effect"
  414. public interface ICanNotBeDestroyedByBattleEffect
  415. {
  416. bool CanNotBeDestroyedByBattle(Permanent permanent, Permanent AttackingPermanent, Permanent DefendingPermanent, CardSource DefendingCard);
  417. bool PermanentCondition(Permanent permanent);
  418. }
  419. #endregion
  420. #region "Target permanent cannot be deleted by effect" effect"
  421. public interface ICanNotBeDestroyedBySkillEffect
  422. {
  423. bool CanNotBeDestroyedBySkill(Permanent permanent, ICardEffect cardEffect);
  424. }
  425. #endregion
  426. #region "Target permanent cannot be removed" effect"
  427. public interface ICanNotBeRemovedEffect
  428. {
  429. bool CanNotBeRemoved(Permanent permanent);
  430. }
  431. #endregion
  432. #region "Target permanent gains Blocker" effect
  433. public interface IBlockerEffect
  434. {
  435. bool IsBlocker(Permanent permanent);
  436. }
  437. #endregion
  438. #region "Add levels for DNA digivolution" effect
  439. public interface IAddJogressLevelsEffect
  440. {
  441. List<int> GetJogressLevels(CardSource cardSource, Permanent permanent);
  442. }
  443. #endregion
  444. #region "Add names for DNA digivolution" effect
  445. public interface IAddDNANamesEffect
  446. {
  447. List<string> GetDNANames(CardSource cardSource, Permanent permanent);
  448. }
  449. #endregion
  450. #region "Change the min memory to end turn" effect
  451. public interface IChangeEndTurnMinMemoryEffect
  452. {
  453. int GetMinMemory(int minMemory);
  454. }
  455. #endregion
  456. #region "Vortex may attack Players" effect
  457. public interface IVortexCanAttackPlayersEffect
  458. {
  459. bool VortexCanAttackPlayersPermanent(Permanent Attacker);
  460. }
  461. #endregion
  462. #region "Instead of trashing after use" effects
  463. public interface IOptionResolutionEffect
  464. {
  465. bool CanResolve(CardSource optionCard);
  466. IEnumerator Resolve(CardSource optionCard);
  467. }
  468. #endregion
  469. #region Collision
  470. public interface ICollisionEffect
  471. {
  472. bool HasCollision(Permanent permanent);
  473. }
  474. #endregion