Commit Graph

718 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
3151dfd348 Better Ai: Foreach training, reduced Eff on "levelingup" based on cards in hand/maxxed in 2nd main, added a selectAbility() call after lands are played and after all cards were searched if none were found to play. after much playtesting i found that if given the chance to find an ability BEFORE playing cards, Ai does dramatically better during a match, the same goes if its given a chance to find one after it looked for stuff to play.
with this change please try playing a few matchs against vanguards chosen and wraith feast, my 2 most favorate decks to fight now. youre in for a treat :)

keep in mind that even tho ive taught Ai Foreach in a somewhat crude manner it still does not understand how much mana it can gain from a foreach manaproducer, and this does not make it suddenly use dark ritual correctly. however this change was dramatic enough that i wanted it in for 14.1

this is also still under massive play testing, however no issues were found so far with it as it is presented here.
2010-11-26 22:10:43 +00:00
wrenczes@gmail.com
75345469ee File addition for my threading work. This has no impact on the build until I tie in my other changes. 2010-11-26 19:41:15 +00:00
techdragon.nguyen@gmail.com
29805852c8 changed vertical scroller as per wololo's suggestion. Scroll speed is a function of the
dt value gathered from Update() instead of ticks.
2010-11-25 16:39:22 +00:00
techdragon.nguyen@gmail.com
22b743ccdf restoring scroller on main page to normal speed 2010-11-25 13:52:36 +00:00
techdragon.nguyen@gmail.com
77cfdf4571 implemented wrapping horizontal scrolling for deck selection screens 2010-11-25 11:32:18 +00:00
techdragon.nguyen@gmail.com
e4c8469490 implemented vertical scrolling.
created new class VerticalTextScroller to handle task display in deck selection screens
modified detailed popup placement on deck selection screen to compensate for lack of border
2010-11-24 16:12:18 +00:00
Xawotihs
7e37e68755 more iOS port fix 2010-11-23 23:35:40 +00:00
omegablast2002@yahoo.com
bce5b9e54b Ai training: some Foreach training, optimizted the equip training to have Ai better use equipment, it should no longer leave equipment sitting around, enticed Ai into paying upcost on cards YAY! no more summon now and lose it next turn! :) enjoy. 2010-11-23 16:52:46 +00:00
techdragon.nguyen@gmail.com
e39c94756b added border to extra details popup as per design at
http://wololo.net/forum/viewtopic.php?f=37&t=2380
and
http://wololo.net/forum/viewtopic.php?f=37&t=2382
2010-11-23 14:02:02 +00:00
techdragon.nguyen@gmail.com
064dad3085 reverted ability/color parser for AATokenCreator.
fixed color parsing error for Transformer classes
2010-11-22 09:51:36 +00:00
Xawotihs
2b6469e391 Mouse support in deck editor 2010-11-20 21:30:15 +00:00
techdragon.nguyen@gmail.com
7e55039b0a * added hashmap for all basic abilities.
* created three new utility functions that return a vector of matching abilities, colors and types
* migrated all activated ability impl into AllAbilities.cpp.  Perhaps we could break AllAbilities up into separate impl files for manageability?
    One for Activated abilities, another for triggers,etc
2010-11-20 19:41:26 +00:00
Xawotihs
048ecb3324 Mouse support in Shop 2010-11-20 17:46:53 +00:00
techdragon.nguyen@gmail.com
36d25441e2 * fixed some boundary conditions for menu initialization
* changed # victories to be calculated value
* removed nbVictories accessor
2010-11-20 10:11:06 +00:00
Xawotihs
3725958fc3 Fix mouse support in menus and first screen 2010-11-20 00:33:37 +00:00
Xawotihs
8339cdd3b3 iOS compilation fixes 2010-11-19 23:16:31 +00:00
techdragon.nguyen@gmail.com
5f70d1cff1 * Renamed AManaRedux to AAlterCost since the latter is more representative of the effect
* moved more implementations from AllAbilities header file into the impl file.
2010-11-19 14:55:29 +00:00
techdragon.nguyen@gmail.com
badbc1c040 more reformatting 2010-11-19 11:30:23 +00:00
techdragon.nguyen@gmail.com
6958411f4d Issue 525: fixed NPE for ABecomes
Reformatted AllAbilities.h
2010-11-19 11:11:22 +00:00
techdragon.nguyen@gmail.com
e0da1b2565 added override to enable details view for Player deck selection screen. 2010-11-19 06:48:51 +00:00
techdragon.nguyen@gmail.com
f684795810 refactored menu classes
fixed some layout issues with detailed info popup
changed requirements for detailed info popup button to be determined by the number of wins aginst AI deck instead of just the number of games.
2010-11-19 04:19:03 +00:00
techdragon.nguyen@gmail.com
4aaa93439a code clean up. removed unneeded methods for stats generation
synced stats info for mana curve on detailed display on deck selection screen so only up to
   Constants::STATS_MAX_MANA_COST+1 is used instead of the currently hard coded 15.
2010-11-19 03:18:48 +00:00
wrenczes
c3f99786fc Don't draw counter text when the draw mode is kHidden; removed two unused member functions. 2010-11-19 01:30:00 +00:00
techdragon.nguyen@gmail.com
2a8f8074e6 New descriptive text popup feature for deck selection
http://wololo.net/forum/viewtopic.php?f=13&t=2423
2010-11-18 15:48:48 +00:00
wagic.the.homebrew@gmail.com
f7bcbb42dc Erwan
- had some problems compiling for the PSP. I assume I was the only one, please let me know if the "include JLogger" lines are not needed (they were needed for me)
- Fix a memory leak when playing in "random deck" mode
- Prevent the AI from playing cards with a cost it cannot understand (ExtraCosts with a target).
2010-11-18 14:04:24 +00:00
jean.chalard
1317eb0d29 J :
* Add multilingual support for utf-8.
* Use japanese as a test case (removing the old tentative support).
* A number of shortcomings affect this code.
  + Bugs :
    - This splits algorithms used to determine the length of a string
      and to render it in two: either the string starts with an ascii
      char and the monobyte, variable-space algorithm is used, or it
      does not and a multibyte but fixed-space algorithm is used.
      This shortcoming also exists in the code to support chinese.
    - From the above comes the biggest limitation: any string that
      starts with an ascii character but include non-ascii characters
      will not be rendered correctly.
    - This does not and cannot support chars outside the BMP. This
      probably won't matter, ever.
  + Todos, fixmes, wishlist :
    - Single-width characters with diacritics are reported as
      double-space chars. It doesn't matter too much at the moment, but
      should be fixed in the future.
    - Font support currently only includes japanese.
  + Performance and compatibility notes :
    - Chinese code has not been switched to utf-8, to maintain backward
      compatibility. We should switch it at some point in the future,
      but ponder the right way to do it first.
    - Retaining the support for chinese with a non-international
      charset hurts performance (by making some methods uselessly
      virtual).
* Still, this generally works and is extensible (it can be used to
  implement korean, traditional chinese, etc, without any more code).
  Implementing languages with diacritics needs an improvement of the
  bool doubleWidthChar() method.
2010-11-14 16:24:29 +00:00
wrenczes@gmail.com
27fd107208 1st step in refactoring some of the card rendering logic - currently, each 'client' has duplicated code having to deal with how to render the full card graphic vs text mode vs using a 'back' image if a card isn't found. This is a first pass at consolidating some of that logic to one location - the ultimate goal being, eventually, the resource cache will actually own the notion of whether it's handing out a real card image or a default filler if the card isn't available, and the client code rendering the card should be oblivious.
In this change, I made the CardGui's RenderBig() and AlternateRender() functions protected; anyone wanting to render a card simply calls RenderCard(), and the card drawing mode is passed along as a param.
2010-11-14 08:15:26 +00:00
wagic.the.homebrew@gmail.com
e758c7eea1 Erwan
- trim long deck names in deck editor/ deck selection
- fixed a bug were the background was rendered in the items loop of the deck selection screen
2010-11-14 02:25:01 +00:00
wagic.the.homebrew@gmail.com
b934f0a5ab Erwan
- reimplement r2609 with inheritance, and cleaned up the function code.
2010-11-14 01:35:26 +00:00
wagic.the.homebrew@gmail.com
d668fbb45c - unix endings for GameStateDeckViewer.h
- fix for issue 509 (font color was incorrect at end of some tests)
- Fixed Dregscape Zombie (fix for test unearth3.txt)
2010-11-14 01:15:46 +00:00
omegablast2002@yahoo.com
2c1e18050c had to add this to prevent crashing in the shop from buying a booster, i understand the need to reduce code but does every single function have to share every other classes functions? this was originally supposed to be a tiny change, but there was no way to define the difference between the card display used by shop and the ones used by grave and library. 2010-11-12 19:12:19 +00:00
wrenczes@gmail.com
eea91e9a1a Two changes here:
1) Consolidated the Loggers so that we only have one in JGE.  Added a helper constructor/destructor to the JLogger class so that you can instantiate one at the top of a function, it'll trace out a 'start' and 'end' message when it goes in & out of scope.
2) Fixed the crash part of a bug I've been chasing down where, on the psp, after saturating the cache, the game dies when trying to reload the background PNG image of the deck menu. We still need to fix the root cause of the failure (not enough memory to allocate a temporary buffer for the swizzle operation), but at least the psp doesn't lock up anymore.  I've also left behind all the log traces I inserted into the LoadPNG code, since we'll probably need them again.
2010-11-10 02:24:39 +00:00
wrenczes@gmail.com
3eeb8a6465 - renamed WResourceManager::autoResize() to ResetCacheLimits(), since the function doesn't actually resize anything. It's merely setting clamping limits on when we should purge the cache.
- fixed the debug framerate calculation / drawing code (consolidated duplicated functions & variables mDelta vs a win-only mDeltaTime, no reason to have two), repositioned it to draw on the bottom left (it was colliding with other debug text for the cache info).
 - for debug testing purposes, added a #define override to force the image cache to work with less memory (I've picked 8 megs, which is what the psp seems to use - the normal default on win/linux is 20 megs).
2010-11-09 19:01:38 +00:00
techdragon.nguyen@gmail.com
286d18847b code cleanup: removed dead code/ unused variables. 2010-11-09 12:19:17 +00:00
techdragon.nguyen@gmail.com
164f2c5205 modified font size so deck name fits on screen when selecting deck for game play. 2010-11-09 05:45:24 +00:00
wagic.the.homebrew@gmail.com
09f01a9eae Erwan
-remove DOLOG committed by mistake
2010-11-08 13:46:21 +00:00
techdragon.nguyen@gmail.com
1e988ef6bb make rendering of retrieval and rendering of background more tightly bounded. 2010-11-08 13:41:32 +00:00
techdragon.nguyen@gmail.com
7fe03d52fd resolved linux compilation issues 2010-11-08 11:59:28 +00:00
techdragon.nguyen@gmail.com
8ba33c9b58 * updated title font size for deck selection screen to ensure it will always fit
* added deck name max pixel size to ensure no deck name overflows into borders of menu.
2010-11-08 11:15:16 +00:00
techdragon.nguyen@gmail.com
61cc3692a5 promoted StatsWrapper struct into class
altered deck editor information display for statistics
2010-11-07 18:28:54 +00:00
wrenczes@gmail.com
471cbd6ba4 More type conversion warning cleanup. 2010-11-07 12:09:04 +00:00
wrenczes@gmail.com
e717b2f260 Line endings -> Unix. 2010-11-07 12:02:55 +00:00
wrenczes@gmail.com
a053c0d59e More type conversion warning cleanup. 2010-11-07 12:00:23 +00:00
wagic.the.homebrew@gmail.com
5d907f5abe Erwan
- Added a possibility to put a file "Res.txt" instead of the folder "Res". The file Res.txt is a simple 1 line text file, telling where to find the Res folder, terminated by "/". For example: "../../wagic_res".
This addresses issue 428 . This could also help us in the future, to develop mods.
2010-11-07 09:26:29 +00:00
wrenczes@gmail.com
b14e3808db Minor code cleanup - pass by reference instead of value; instead of creating temp char arrays on each deck loop while building deck metadata, use an ostringstream when needed. 2010-11-07 03:55:56 +00:00
wagic.the.homebrew@gmail.com
416617fc0d Erwan
- fixed memory leak in AEquip/ATeach 
- Test suite now trims strings correctly (allows to have space between comma-separated card names)
- Added Paradise Mantle (for ATeach test)
- removed a missing wallpaper from wallpapers list
2010-11-07 02:27:54 +00:00
wrenczes@gmail.com
3c19533a4c Added the notion of a 'cancel' button, and unified all the 'cancel' menu IDs to be kCancelMenuID (ie -1). I've slaved the Menu button (ie Esc on win, 'Start' button on PSP) to this - the idea being, if you hit the Menu button to bring up a menu, hitting it again will dismiss it without doing anything, which is pretty standard behavior for most console/computer games. 2010-11-07 02:08:17 +00:00
techdragon.nguyen@gmail.com
b0c61049da tweaked menus a bit.
fixed possible NPE with background image retrieval
2010-11-06 10:05:54 +00:00
omegablast2002@yahoo.com
6c616f2741 added pdcount varible. playerdamagecount for the turn. this is for Simulacrum style cards.
Issue: 502
2010-11-06 08:07:48 +00:00
omegablast2002@yahoo.com
ed03d2f3ef added optimizing of opponents hand if the opponent deck is listed as "easy". slight optimize if listed as "normal" none if listed as "hard" this provides slightly more challange from even poorly constructed Ai decks. taught Ai to pump creatures during combat, and more so if its heading directly at player, taught Ai that its better to use "becomes" and "transforms" during first main. this allow its to actually attack with the manlands ect.
new ability lord...teach(whatever[whatever]) ability.
teach is a targeted lord, it takes the cards current target and lords it the ability. im aware of a tiny memleak it contains, but the leak is happening on parser lvl, so i need more eyes to look at it. teach is ideally used for equipment, and was designed to fix issue 244 taught abilities are not given to the source cards.

forced Ai to pay for sunburst correctly. it was choosing to pay with all of one type of mana. now it pays either max or 1 from max sunburst.

added a tiny double check for Ai to try and find something to use if it suddenly has mana in its pool. it is only a single check in a turn, but i notice it actually does slightly improve the usages of dark ritual and foreach mana producers. ideally i wanted it to check EVERYTIME. but i could not achieve it without putting the game in danger of looping. so once is better then none :/

fixed a bug with affinity where it was not counting duel lands, this is becuase of not setting it up correctly for lands with multiple types SORRY!
2010-11-06 06:59:43 +00:00