Commit Graph

533 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
f2c405566f Erwan
- fix psp compilation, thanks to the people who reported the issue
2010-03-23 12:32:25 +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
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
8a4797a06a Erwan
- quick patch for i379
2010-03-13 07:25:07 +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
882724ab4b Erwan
- Yet Another Attempt at fixing i319,i365, i372
2010-03-03 14:56:12 +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.the.homebrew@gmail.com
f627f92557 Erwxan
-fix compilation issue on windows
2010-02-28 13:24:31 +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
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
febad680b1 Jeck - Fixed issue 361. 2010-02-25 14:10:13 +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
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
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
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
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
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
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
wagic.jeck
ab22719e4d Jeck - Deck editor filtering now works much better- single filter, automatically recolors itself to match the active color. 2010-02-17 04:08:51 +00:00
wagic.jeck
a123cebfe5 Jeck - Fixed an error with packs, fixed basic info in deck editor, removed duplicated code in DeckDataWrapper. 2010-02-17 03:10:56 +00:00
wagic.the.homebrew@gmail.com
d5be045859 Erwan
- Adding (dead) code for Story mode. This is FAR from being ready so it's deactivated in the code. I just don't want to create a branch (I'm lazy) and I'm fed up with synching. My Goal is to have a tutorial ready with this for the release after this one. If you want to test it (Note: the sample story is not interesting at ALL), just look for "Story mode" and uncomment (3 occurrences). PSP Or Linux need additions to the Makefile...
2010-02-16 10:55:03 +00:00
wagic.jeck
7104eff946 Jeck - for HQ users, added flexible image scales to task board backdrop. 2010-02-16 01:22:47 +00:00
wagic.jeck
62609ee1b1 Jeck - Some cleanup, fixed a double-deletion error in GameStateDeckViewer (when unlocking all cards). 2010-02-15 23:29:54 +00:00
jean.chalard
2faabf98b5 J :
* Little progress on the interface for key bindings.
* This seems to still be stable so I commit while I'm at it.
2010-02-15 18:14:24 +00:00
jean.chalard
e7d72b7722 J :
* The key bindings now display (semi-)correctly.
  - Here, "semi-" means the local keys display as a string under X and
    a number everywhere else. The number is all but helpful and will
    have to be replaced before it is usable, but at the moment, the
    code is stable afaik.
2010-02-15 17:34:30 +00:00
jean.chalard
16ca1a929f J :
* Some interface for key bindings
2010-02-15 14:32:56 +00:00
jean.chalard
56ce4a14ae J :
* Create the subsystem for keybindings.
2010-02-14 13:21:12 +00:00
wagic.jeck
470e3321e4 Jeck - Potential crash fix, removed unused variable. 2010-02-11 21:03:27 +00:00
wagic.jeck
ab34fc16f9 Jeck - Added custom booster packs (see miki), numerous small fixes. Once we hit feature-freeze I'll be reviewing this stuff in depth, as again there's likely a lot of room for cleaning... just wanted to get it in first :).
I cut some bits out that weren't ready for SVN, hopefully I've committed everything correctly.
2010-02-11 18:32:44 +00:00
wagic.jeck
cf03d4cc64 Jeck - fix to issue 318. 2010-02-10 15:48:38 +00:00
wagic.jeck
e59aca67b7 Jeck - Fix for issue 320, also fix for countByName. 2010-02-10 14:46:10 +00:00
wagic.jeck
9806edc6d0 Jeck - Fix for issue 316 (shop selection not cyclical). 2010-02-10 14:03:08 +00:00
wagic.jeck
7fd2956399 Jeck - Added option to disable screen transitions. 2010-02-10 02:38:41 +00:00
wagic.jeck
4be2dddaf9 Jeck - Cleaned up filters a tiny bit (they no longer use idiotically duplicated vector<pair<string,string>>'s), added colorless mana filter ability, "exclusively X color" filter. 2010-02-09 19:25:53 +00:00
wagic.jeck
3c2d57508e Jeck - Increased shop "text list" fade-in time, changed alternateRender to display "Land" rarity as well as common-mythic. 2010-02-09 17:13:49 +00:00
wagic.jeck
2a2bcef71a Jeck - Hooked economic difficulty into booster prices. 2010-02-09 16:56:39 +00:00
wagic.jeck
5444c4e507 Jeck - Changed filter pricing scheme- filter tax is now inversely proportional to the amount of results. Added preliminary "economic difficulty" option. Note that it requires difficulty modes to be unlocked (at least to appear in the gui). Should we make it available from the start? 2010-02-09 16:23:29 +00:00
wagic.jeck
e5be940766 Jeck - Added filtering by card's first letter. This is pretty much the last filter I can think of, except possibly some more complex ones like the mana producer filter. 2010-02-08 23:10:45 +00:00
wagic.jeck
251f89d7b9 Jeck - Consolidated card price functions from deckviewer/shop into PriceList. Also moved price discount hash variable. (As of around r1825, price discount has been based on (mtgid + static int randomKey) % 20. randomKey updates at the end of any won game, making prices for a given fixed between visits to the shop on the same "day") 2010-02-08 20:13:48 +00:00
wagic.jeck
b348ab5d24 Jeck - Added and tested "oneblocker" ability, which allows for cards that "can't be blocked by more than one creature.". I've put in Stalking Tiger (I think... these primitives are cool! I just added the prim and all of a sudden it was in 10E), but this should also add Charging Rhino, Familiar Ground, "Huang Zhong, Shu General", Ironhoof Ox, Krosan Vorine, Norwood Riders, Vorrac Battlehorns, "Yuan Shao, the indecisive".
Test and more cards (the ones I can figure out how to do) forthcoming.
2010-02-08 18:18:44 +00:00
wagic.jeck
e96d4b9a07 Jeck - Cleaned up and reordered some menus, fixed potential heap corruption in GameStateShop. 2010-02-08 08:54:55 +00:00
wagic.jeck
bf4595ee70 Jeck - Added filter for mana-producing abilities. 2010-02-08 06:08:29 +00:00