CardEffectInterfaces.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  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 "Target card cannot be affected by effects" effect
  78. public interface ICanNotAffectedEffect
  79. {
  80. bool CanNotAffect(CardSource cardSource, ICardEffect cardEffect);
  81. }
  82. #endregion
  83. #region "Target card cannot be trashed from digivolution cards" effect
  84. public interface ICanNotTrashFromDigivolutionCardsEffect
  85. {
  86. bool CanNotTrashFromDigivolutionCards(CardSource cardSource, ICardEffect cardEffect);
  87. }
  88. #endregion
  89. #region "Change target permanent's Security Attack" effect
  90. public interface IChangeSAttackEffect
  91. {
  92. int GetSAttack(int SAttack, Permanent permanent, int invertValue);
  93. CalculateOrder isUpDown();
  94. bool PermanentCondition(Permanent permanent);
  95. }
  96. #endregion
  97. #region "Change target permanent's Link Max" effect
  98. public interface IChangeLinkMaxEffect
  99. {
  100. int GetLinkMax(int linkMax, Permanent permanent, int invertValue);
  101. CalculateOrder isUpDown();
  102. bool PermanentCondition(Permanent permanent);
  103. }
  104. #endregion
  105. #region "Invert target permanent's Security Attack" effect
  106. public interface IInvertSAttackEffect
  107. {
  108. int InversionValue(Permanent permanent, int invertValue);
  109. bool PermanentCondition(Permanent permanent);
  110. }
  111. #endregion
  112. #region "Change target card's card names" effect
  113. public interface IChangeCardNamesEffect
  114. {
  115. List<string> ChangeCardNames(List<string> CardNames, CardSource cardSource);
  116. }
  117. #endregion
  118. #region "Change target card's origin card names" effect
  119. public interface IChangeBaseCardNameEffect
  120. {
  121. List<string> ChangeBaseCardNames(List<string> BaseCardNames, CardSource cardSource);
  122. }
  123. #endregion
  124. #region "Change target card's card names for DigiXros" effect
  125. public interface IChangeCardNamesForDigiXrosEffect
  126. {
  127. List<string> ChangeCardNamesForDigiXros(List<string> CardNames, CardSource cardSource);
  128. }
  129. #endregion
  130. #region "Change target card's card level for Assembly" effect
  131. public interface IChangeCardLevelForAssemblyEffect
  132. {
  133. List<int> ChangeCardLevelForAssembly(List<int> levels, CardSource cardSource);
  134. }
  135. #endregion
  136. #region "Change target card's traits" effect
  137. public interface IChangeTraitsEffect
  138. {
  139. List<string> ChangTraits(List<string> Traits, CardSource cardSource);
  140. }
  141. #endregion
  142. #region "Target permanent cannot unsuspend" effect
  143. public interface ICanNotUnsuspendEffect
  144. {
  145. bool CanNotUnsuspend(Permanent permanent);
  146. }
  147. #endregion
  148. #region "Target permanent cannot suspend" effect
  149. public interface ICanNotSuspendEffect
  150. {
  151. bool CanNotSuspend(Permanent permanent);
  152. }
  153. #endregion
  154. #region "Target permanent cannot return to hand" effect
  155. public interface ICannotReturnToHandEffect
  156. {
  157. bool CannotReturnToHand(Permanent permanent, ICardEffect cardEffect);
  158. }
  159. #endregion
  160. #region "Target permanent cannot return to deck" effect
  161. public interface ICannotReturnToLibraryEffect
  162. {
  163. bool CannotReturnToLibrary(Permanent permanent, ICardEffect cardEffect);
  164. }
  165. #endregion
  166. #region "Target permanent cannot affected by DP minus effect" effect
  167. public interface IImmuneFromDPMinusEffect
  168. {
  169. bool ImmuneFromDPMinus(Permanent permanent, ICardEffect cardEffect);
  170. }
  171. #endregion
  172. #region "Target permanent cannot affected by De-Digivolve" effect
  173. public interface IImmuneFromDeDigivolveEffect
  174. {
  175. bool ImmuneDeDigivolve(Permanent permanent);
  176. }
  177. #endregion
  178. #region "Target permanent cannot have its stack cards trashed" effect
  179. public interface IImmuneFromStackTrashingEffect
  180. {
  181. bool ImmuneStackTrashing(Permanent permanent, ICardEffect effect);
  182. }
  183. #endregion
  184. #region "Target permanent does not have DP" effect
  185. public interface IDontHaveDPEffect
  186. {
  187. bool DontHaveDP(Permanent permanent);
  188. }
  189. #endregion
  190. #region "Change target permanent's DP" effect
  191. public interface IChangeDPEffect
  192. {
  193. int GetDP(int DP, Permanent permanent);
  194. bool PermanentCondition(Permanent permanent);
  195. bool IsUpDown();
  196. bool IsMinusDP();
  197. }
  198. #endregion
  199. #region "Change target permanent's origin DP" effect
  200. public interface IChangeBaseDPEffect
  201. {
  202. int GetDP(int DP, Permanent permanent);
  203. bool PermanentCondition(Permanent permanent);
  204. bool IsUpDown();
  205. bool IsMinusDP();
  206. }
  207. #endregion
  208. #region "Change target card's DP" effect
  209. public interface IChangeCardDPEffect
  210. {
  211. int GetDP(int DP, CardSource cardSource);
  212. bool CardCondition(CardSource cardSource);
  213. bool IsUpDown();
  214. bool IsMinusDP();
  215. }
  216. #endregion
  217. #region "Change target card's cost" effect
  218. public interface IChangeCostEffect
  219. {
  220. int GetCost(int cost, CardSource cardSource, SelectCardEffect.Root root, List<Permanent> targetPermanents);
  221. bool CardCondition(CardSource cardSource);
  222. bool IsUpDown();
  223. bool IsCheckAvailability();
  224. bool IsChangePayingCost();
  225. }
  226. #endregion
  227. #region "Change target card's cost" effect
  228. public interface IChangeLinkCostEffect
  229. {
  230. int GetCost(int cost, CardSource cardSource, Permanent permanent, SelectCardEffect.Root root);
  231. bool CardCondition(CardSource cardSource);
  232. bool PermanentCondition(Permanent permanent);
  233. bool IsUpDown();
  234. }
  235. #endregion
  236. #region "Change the maximum DP of DP-based deletion effect" effect
  237. public interface IChangeDPDeleteEffectMaxDPEffect
  238. {
  239. int GetMaxDP(int maxDP, ICardEffect cardEffect);
  240. }
  241. #endregion
  242. #region "Change target permanent's level" effect
  243. public interface IChangePermanentLevelEffect
  244. {
  245. int GetPermanentLevel(int level, Permanent permanent);
  246. }
  247. #endregion
  248. #region "Change target card's level" effect
  249. public interface IChangeCardLevelEffect
  250. {
  251. int GetCardLevel(int level, CardSource cardSource);
  252. }
  253. #endregion
  254. #region "Target attacking permanent can attack to target defending permanent" effect
  255. public interface ICanAttackTargetDefendingPermanentEffect
  256. {
  257. bool CanAttackTargetDefendingPermanent(Permanent Attacker, Permanent Defender, ICardEffect cardEffect);
  258. }
  259. #endregion
  260. #region "Target attacking permanent cannot attack to target defending permanent" effect
  261. public interface ICanNotAttackTargetDefendingPermanentEffect
  262. {
  263. bool CanNotAttackTargetDefendingPermanent(Permanent Attacker, Permanent Defender);
  264. }
  265. #endregion
  266. #region "Target Security Digimon card does not battle" effect
  267. public interface IDontBattleSecurityDigimonEffect
  268. {
  269. bool DontBattleSecurityDigimon(CardSource cardSource);
  270. }
  271. #endregion
  272. #region "Target defending permanent cannot block target attacking permanent" effect"
  273. public interface ICannotBlockEffect
  274. {
  275. bool CannotBlock(Permanent AttackingPermanent, Permanent BlockingPermanent);
  276. }
  277. #endregion
  278. #region "Target permanent gets additional digivolution condition" effect
  279. public interface IAddDigivolutionRequirementEffect
  280. {
  281. int GetEvoCost(Permanent permanent, CardSource cardSource, CardEffectCommons.IgnoreRequirement ignore, bool checkAvailability);
  282. }
  283. #endregion
  284. #region "Target player cannot gain Memory by effects" effect
  285. public interface ICannotAddMemoryEffect
  286. {
  287. bool cannotAddMemory(Player player, ICardEffect cardEffect);
  288. }
  289. #endregion
  290. #region "Target player cannot reduce digivolution costs" effect
  291. public interface ICannotReduceCostEffect
  292. {
  293. bool CannotReduceCost(Player player, List<Permanent> targetPermanents, CardSource cardSource);
  294. }
  295. #endregion
  296. #region "Target player cannot ignore digivolution condition" effect
  297. public interface ICannotIgnoreDigivolutionConditionEffect
  298. {
  299. bool cannotIgnoreDigivolutionCondition(Player player, Permanent targetPermanent, CardSource cardSource);
  300. }
  301. #endregion
  302. #region "Target player cannot add Security" effect
  303. public interface ICannotAddSecurityEffect
  304. {
  305. bool cannotAddSecurity(Player player, ICardEffect cardEffect);
  306. }
  307. #endregion
  308. #region "Target Digimon can be suspended by Digisorption" effect
  309. public interface ICanSuspendByDigisorptionEffect
  310. {
  311. bool canSuspendDigisorption(Permanent permanent, ICardEffect cardEffect);
  312. bool isCheckAvailability();
  313. }
  314. #endregion
  315. #region "Target permanent cannot digivolve into target card" effect"
  316. public interface ICanNotDigivolveEffect
  317. {
  318. bool CanNotEvolve(Permanent permanent, CardSource cardSource);
  319. }
  320. #endregion
  321. #region "Target card cannot be played as a new permanent" effect
  322. public interface ICanNotPutFieldEffect
  323. {
  324. bool CanNotPutField(CardSource cardSource, ICardEffect cardEffect);
  325. }
  326. #endregion
  327. #region "Target card cannot be moved" effect
  328. public interface ICanNotMoveEffect
  329. {
  330. bool CanNotMove(CardSource cardSource, ICardEffect cardEffect);
  331. }
  332. #endregion
  333. #region "Target card gains DNA digivolution conditions" effect
  334. public interface IAddJogressConditionEffect
  335. {
  336. JogressCondition GetJogressCondition(CardSource cardSource);
  337. }
  338. #endregion
  339. #region "Target card gains DigiXros conditions" effect
  340. public interface IAddDigiXrosConditionEffect
  341. {
  342. DigiXrosCondition GetDigiXrosCondition(CardSource cardSource);
  343. }
  344. #endregion
  345. #region "Target card gains Assembly conditions" effect
  346. public interface IAddAssemblyConditionEffect
  347. {
  348. AssemblyCondition GetAssemblyCondition(CardSource cardSource);
  349. }
  350. #endregion
  351. #region "Target card gains Burst digivolution conditions" effect
  352. public interface IAddBurstDigivolutionConditionEffect
  353. {
  354. BurstDigivolutionCondition GetBurstDigivolutionCondition(CardSource cardSource);
  355. }
  356. #endregion
  357. #region "Target card gains Link conditions" effect
  358. public interface IAddLinkConditionEffect
  359. {
  360. LinkCondition GetLinkCondition(CardSource cardSource);
  361. }
  362. #endregion
  363. #region "Target card gains App Fusion digivolution conditions" effect
  364. public interface IAddAppFusionConditionEffect
  365. {
  366. AppFusionCondition GetAppFusionCondition(CardSource cardSource);
  367. }
  368. #endregion
  369. #region "Add the maximum number of cards that can be selected from trash in DigiXros" effect
  370. public interface IAddMaxTrashCountDigiXrosEffect
  371. {
  372. int GetMaxTrashCount(CardSource cardSource);
  373. }
  374. #endregion
  375. #region "Add the maximum number of cards that can be selected from under Tamer in DigiXros" effect
  376. public interface IAddMaxUnderTamerCountDigiXrosEffect
  377. {
  378. int getMaxUnderTamerCount(CardSource cardSource);
  379. }
  380. #endregion
  381. #region "Target card be selected in DigiXros" effect
  382. public interface ICanSelectDigiXrosEffect
  383. {
  384. bool CanSelect(CardSource cardSource, Permanent permanent);
  385. }
  386. #endregion
  387. #region "Target card be selected in Assembly" effect
  388. public interface ICanSelectAssemblyEffect
  389. {
  390. bool CanSelect(CardSource cardSource, Permanent permanent);
  391. }
  392. #endregion
  393. #region "Target permanent's attack target cannot be switched" effect"
  394. public interface ICanNotSwitchAttackTargetEffect
  395. {
  396. bool CanNotBeSwitchAttackTarget(Permanent permanent);
  397. }
  398. #endregion
  399. #region "Target permanent cannot be deleted" effect"
  400. public interface ICanNotBeDestroyedEffect
  401. {
  402. bool CanNotBeDestroyed(Permanent permanent);
  403. }
  404. #endregion
  405. #region "Target permanent cannot be deleted by battle" effect"
  406. public interface ICanNotBeDestroyedByBattleEffect
  407. {
  408. bool CanNotBeDestroyedByBattle(Permanent permanent, Permanent AttackingPermanent, Permanent DefendingPermanent, CardSource DefendingCard);
  409. bool PermanentCondition(Permanent permanent);
  410. }
  411. #endregion
  412. #region "Target permanent cannot be deleted by effect" effect"
  413. public interface ICanNotBeDestroyedBySkillEffect
  414. {
  415. bool CanNotBeDestroyedBySkill(Permanent permanent, ICardEffect cardEffect);
  416. }
  417. #endregion
  418. #region "Target permanent cannot be removed" effect"
  419. public interface ICanNotBeRemovedEffect
  420. {
  421. bool CanNotBeRemoved(Permanent permanent);
  422. }
  423. #endregion
  424. #region "Target permanent gains Blocker" effect
  425. public interface IBlockerEffect
  426. {
  427. bool IsBlocker(Permanent permanent);
  428. }
  429. #endregion
  430. #region "Add levels for DNA digivolution" effect
  431. public interface IAddJogressLevelsEffect
  432. {
  433. List<int> GetJogressLevels(CardSource cardSource, Permanent permanent);
  434. }
  435. #endregion
  436. #region "Add names for DNA digivolution" effect
  437. public interface IAddDNANamesEffect
  438. {
  439. List<string> GetDNANames(CardSource cardSource, Permanent permanent);
  440. }
  441. #endregion
  442. #region "Change the min memory to end turn" effect
  443. public interface IChangeEndTurnMinMemoryEffect
  444. {
  445. int GetMinMemory(int minMemory);
  446. }
  447. #endregion
  448. #region "Vortex may attack Players" effect
  449. public interface IVortexCanAttackPlayersEffect
  450. {
  451. bool VortexCanAttackPlayersPermanent(Permanent Attacker);
  452. }
  453. #endregion
  454. #region "Instead of trashing after use" effects
  455. public interface IOptionResolutionEffect
  456. {
  457. bool CanResolve(CardSource optionCard);
  458. IEnumerator Resolve(CardSource optionCard);
  459. }
  460. #endregion
  461. #region Collision
  462. public interface ICollisionEffect
  463. {
  464. bool HasCollision(Permanent permanent);
  465. }
  466. #endregion