Commit Graph

833 Commits

Author SHA1 Message Date
solo81@web.de
07361b19f5 This is another patch by the great newcomer salmelo.
Salmelo:"Here is another patch, this time adding counters to target specifications, so now you should be able to target things with counters on them as well as use counters for criterion for Lord, aslongas, foreach, etc.
I had to muddle the syntax a little bit though, so heres an example, taken from gwafa hazid, whom I added to the primitives to test with.

lord(creature[counter{0/0.1.Bribe}]|opponentbattlefield) cantattack

obviously the part we are worried about is the counter part, note that those are curly braces { } and periods . instead of parentheses ( ) and commas , this is so that it does not conflict with how targets are normally parsed, which it did before I changed those. Counters still work the same way everywhere else though, you only need to use { } and periods in target code.

Also, you can use counter{any} to specify that it should look for things with any kind of counter on them, not just specific ones, this is used by Kulrath Knight, for example.

I also consolidated most of the code used to parse counter specifications, as it seemed unnecessary duplicating it three times.

Anyway, aside from this major addition, I also added Gwafa Hazid, Profiteer; and Kulrath Knight to the primitives, as well as a test file for each to make sure it worked.

Hopefully y'all will find this patch useful.

Oh, and I should point out that it only works with one Counter in the target specification, i imagine if you put two in the same one then it would either overwrite the first with the second or merge them into some sort of hybrid counter monstrosity, either way, I wouldn't suggest it. "

Cards with vanishing are also codable now. Have a look at the comments for explanation.

daily_build.
2010-03-24 21:15:34 +00:00
wagic.the.homebrew@gmail.com
22a35d2265 Erwan
- Added remove/add counters as a cost, patch by Salmelo, thanks man!. See primitives/mtg.txt -> Thallid to see how it works
- added test for i286 by salmelo
- added basic display for counters (this needs improvement) by salmelo
2010-03-22 04:26:42 +00:00
wagic.the.homebrew@gmail.com
99db31fe9d Erwan
-Kjeldoran_frostbeast fix i167 by salmelo
2010-03-22 03:13:40 +00:00
wagic.the.homebrew@gmail.com
55a23bb359 Erwan
- fix issue 382
2010-03-13 09:51:49 +00:00
wagic.the.homebrew@gmail.com
e7bb2caf29 Erwan
- Fix issue 291 (cantbeblockedby segfault)
- Fix some issues with pricing
2010-03-13 09:34:20 +00:00
wagic.the.homebrew@gmail.com
fa0d98988d Erwan
- quick patches, attempt at fixing a few crashes
2010-03-13 08:48:40 +00:00
wagic.the.homebrew@gmail.com
8a4797a06a Erwan
- quick patch for i379
2010-03-13 07:25:07 +00:00
jean.chalard
e7a1c96d4a J :
* Remove annoying debug printf's.
2010-03-07 13:49:11 +00:00
jean.chalard
76e373f64e J :
* Fix issue 378, where the particles would not appear upon the second
  opening of an existing menu.
* Fix for one of the issues of issue 380, where the selectionY
  attribute would be used uninitialized - reported by valgrind as
  an access to an uninitialized value in sinf and cosf.
2010-03-07 09:28:53 +00:00
jean.chalard
ec0354f630 J :
* Fix issue 357, where the hand loses focus when the opponent declares
  attackers while the hand is open.
* Harmonize the code for CardSelector.cpp to the coding style.
2010-03-05 17:01:00 +00:00
wagic.the.homebrew@gmail.com
cf1e419aaf Erwan
- fix for issue 348
- Fix a bug when going out of the deck editor then back to it again would show an incorrect color icon instead of nothing
- Fix a bug where the AI tries to play a spell with a target instead of just checking if it can play it. (visually, this showed as the AI tapping mana, then "freezing" for a few seconds with some cards grayed out on the battlefield)
2010-03-04 11:43:22 +00:00
wagic.the.homebrew@gmail.com
882724ab4b Erwan
- Yet Another Attempt at fixing i319,i365, i372
2010-03-03 14:56:12 +00:00
wagic.jeck
6894553c07 Jeck - fix signed/unsigned issue with prior revision. 2010-03-02 04:36:52 +00:00
wagic.jeck
b5dc729f58 Jeck - Change to deck viewer mana producer counting function, fix potential problem with mana producer filtering. 2010-03-02 04:04:11 +00:00
wagic.jeck
034e61e9fa Jeck - partial revert of r1948, minor optimizations to where validate() is called. 2010-03-02 03:05:26 +00:00
wagic.the.homebrew@gmail.com
c09dabfdbf Erwan
- attempt to fix issue 319. Jeck please review :)
2010-03-01 13:43:46 +00:00
wagic.jeck
855288fa87 Jeck - Fixed an issue which caused deck switching to crash. 2010-03-01 07:27:10 +00:00
wagic.jeck
4159aad221 Jeck - Fix to WSrcDeck's card counting, so it correctly handles negative numbers (removing cards). 2010-02-28 22:55:06 +00:00
wagic.jeck
706ebca249 Jeck - Quick fix for issue 370, issue 365, (and hopefully) issue 319 . Thanks for the report, Psy.
(Counts weren't being updated as often as they should be. Now they might be updated too often, but that's better than the alternative.)
2010-02-28 22:12:17 +00:00
jean.chalard
168154b52d J :
* Add the confirmation screen for bindings.
  - Add support for asking confirmations before exiting the menu.
  - Add support for cancelling saving of options.
  - Add support for requesting focus when the parent allows to yield.
* Recenter most options' text.
* Change the background color of the selected options (else, there is
  no way of knowing where is the cursor when both option text and
  option value are icons).
* Change symbol names to their equivalent PSP icon use in wagic.
2010-02-28 12:36:09 +00:00
wagic.the.homebrew@gmail.com
db8724e045 Erwan
-removing ctrl M garbage
2010-02-28 08:05:47 +00:00
wagic.the.homebrew@gmail.com
d3d34c6290 Erwan
- Key texts for Windows
2010-02-28 08:02:16 +00:00
jean.chalard
2566d780b1 J :
* Display pictures for buttons on PSP in the keybinding screen.
* Fix a bug where the New Binding... button would disappear when
  creating a new binding.
* Fix a bug where the menu to choose the bound symbol was not modal.
2010-02-27 18:49:03 +00:00
wagic.jeck
e9b6860923 Jeck - reverted fix for invalid issue 359. 2010-02-26 00:46:03 +00:00
wagic.jeck
5e0be442b0 Jeck - Removed "Reverse Triggers" option, as per issue 359. 2010-02-25 15:22:19 +00:00
wagic.jeck
233c1d8383 Jeck - Potential fix to issue 319. 2010-02-25 15:13:01 +00:00
wagic.jeck
44044bc99b Jeck - Fix to deck statistics regarding land. 2010-02-25 15:09:53 +00:00
wagic.jeck
febad680b1 Jeck - Fixed issue 361. 2010-02-25 14:10:13 +00:00
wagic.the.homebrew@gmail.com
ff6f437e9a Erwan
- Fix issue 360 (gray out cards with quantity 0)
2010-02-25 11:56:37 +00:00
jean.chalard
39c5a3d465 J :
* Fix u32 into JButtons.
* Add a few comments.
* Remove useless variables.
2010-02-24 17:28:17 +00:00
wagic.jeck
9998a2bdf3 Jeck - fix to idiotic sprintf mistake (was printing the enum itself, not the value indexed by the enum). 2010-02-19 23:40:35 +00:00
wagic.jeck
5dd2388b6f Jeck - More deck editor fixes, quick hack to subtypes filter. I've noticed some slowdown while scrolling up/down in the deck editor, I think this is due to some recent changes that removed a few of the filter system's optimizations. I'll re-implement them tonight. 2010-02-19 23:06:44 +00:00
jean.chalard
4254d8cb9f J :
* Put in text instead of numbers for the time being
2010-02-19 22:47:24 +00:00
jean.chalard
de94069829 J :
* Remove a crash
* This removes images for PSP buttons for the moment
2010-02-19 22:43:55 +00:00
wagic.jeck
bb82dc38f2 Jeck - Linked both sets into one filter menu. Requires more testing, but appears to work on PSP/PC as it should. 2010-02-19 22:38:09 +00:00
wagic.jeck
25e6906149 Jeck - More deck editor fixes, linked in prior coded subtype filter. 2010-02-19 21:54:39 +00:00
wagic.jeck
afffd4509f Jeck - fixed issue 354, cleaned up mixed boosters, fixed a few issues with pack loading (slot pools weren't working), fixed TSP boosters to use 'S' rarity, removed some unused code. 2010-02-19 20:10:30 +00:00
jean.chalard
c67390be88 J :
* Fix a wrong cast.
2010-02-19 10:20:18 +00:00
jean.chalard
b63e9f9847 J :
* Use images for PSP buttons.
* Um not tested. I don't have my PSP on me
2010-02-19 06:42:47 +00:00
jean.chalard
72e395d1e1 J :
* Fix a bug on key bindings on PSP.
2010-02-18 20:54:18 +00:00
jean.chalard
abd92ffcbf J :
* This finalizes the functionality for key bindings.
* Key bindings are saved in the user's configuration file and read
  back the next time.
* Still got to do : display, instead of a number, an icon on PSP and a
  string on windows (linux/mac already done).
2010-02-18 20:36:31 +00:00
jean.chalard
c87a98eb14 J :
* Grab the keyboard and display the grabbed key.
* Include a tentative interface for the initial message. It's ugly.
2010-02-18 08:03:22 +00:00
wagic.jeck
5d275391f2 Jeck - More incremental deck editor fixes. It'll be at 100% eventually, as soon as I rewrite some code so that there aren't individual filter lists per deck/collection. 2010-02-18 00:58:24 +00:00
wagic.jeck
71e0792cde Jeck - Additional fixes for deck editor. Unfortunately, it still has separate filters for deck and collection, but I'm working on that. 2010-02-17 23:27:17 +00:00
wagic.jeck
76fa3221d7 Jeck - Deck editor fixes. 2010-02-17 20:52:30 +00:00
wagic.jeck
78b864666e Jeck - Fix for issue 338. Please see the note in that issue for details. 2010-02-17 20:35:37 +00:00
wagic.jeck
ce2f8aebea Jeck - fix to issue 347. 2010-02-17 19:29:22 +00:00
wagic.jeck
8b1a812e02 Jeck - Normal and Hard economic difficulty no longer display visible prices before the player asks about a card. This allows Wololo's clever pricing algorithm to work :) 2010-02-17 19:02:35 +00:00
jean.chalard
436da6fcc0 J :
* Very small addition to the key bindings menu.
2010-02-17 15:24:14 +00:00
wagic.jeck
4fd38766b1 Jeck - Daily build & fix to r1895. Now the deck editor does what I thought it did. 2010-02-17 15:16:59 +00:00