-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding The tale of Tamiyo (v1.0) #13086
Conversation
} | ||
|
||
@Override | ||
public TheTaleOfTamiyo copy() {return new TheTaleOfTamiyo(this); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style - new line after opening brace and before/after closing brace
break; | ||
} | ||
|
||
} while (controller.getLibrary().size() >= 2); // Continue if there are at least 2 cards left in the library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. Nothing about the effect states that there must be two cards left in the library to mill. Specifically, if there is one card left, it should be milled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that I can fix this. For the other requests I'm afraid I can't do much, my coding experience is almost nonexistant. I tried to fix some of those other problems with the help of Chat gpt but I'm not having much success.
do { | ||
iteration++; | ||
if (iteration > possibleIterations + 20) { | ||
// Protection against infinity loops |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "protection" is not standard and I can't think of why manually counting iterations would be beneficial.
Instead use:
} while (controller.canRespond());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either, I copy/pasted it from Grindstone's code (that is the base of this effect's code)
"from your graveyard. Copy them. You may cast any number of the copies."; | ||
|
||
// Initialize filter | ||
this.filter = new FilterCard("instant, sorcery, or Tamiyo planeswalker card"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make the filter static
and put this initialization in a static
block after it, not in the constructor.
|
||
// Cast copies | ||
boolean continueCasting = true; | ||
while (controller.canRespond() && continueCasting && !copiedCards.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use a while loop for this. Instead, use Integer.MAX_VALUE for the max number of targets in the target card, so all the cards to cast can be selected at once. Then for the casting process iterate through those targets with a for loop.
EDIT: I should mention that I made this card with the help of Chat GPT and that I have no coding experience. My process was to base the first ability of the saga on Grindstone, and the second on Mizzix's Mastery's overload ability. Than I used chat GPT to fix the errors that InteljIDEA signaled to me. Finally I tested the card.