Commit Graph

100 Commits

Author SHA1 Message Date
wrenczes@gmail.com
65e38b0694 Another change that looks bigger than it is: changed out the global extern WResourceManager to a real singleton. This means that it's no longer being init'ed at static initialization time, and we can debug construction/destruction properly; it's also safer in a multithreaded context. 2010-12-01 08:22:17 +00:00
omegablast2002@yahoo.com
29fc58388d Added 2 new cheats, "Optimize starting hand" and "Unlock all Ai decks"
added new mana display option "No Glitter" acciddently(?) lost "both" options somehow.
the new "no glitter mana display is basically "eye candy without particle effects" on PC created 2000 mana...no FPS drop...on PSP created an EXTREMELY large amount of mana before i noticed an FPS drop of any kind, this is dramatically better then 
what was in previous rev, create 20 mana and crash.

if someone could figure out how i manage to lose the "Both" option, please explain to me why it wasnt showing up, i spent 2 hours trying to get it back.

both "optimize starting hand" and "Unlock all Ai Decks" appear in options under the option to "enable cheats"

optimize gives you decent starting hands, and Unlock all Ai decks is basically just a bypass options for the unlock deck mode varible wololo added.

tweaked abilitygranting Eff in Ai lessons to be divided by the number of cards in hand, this will mean Ai will tend to focus on using mana to cast spells instead of using them to grant abilities, until theres only 1 or less cards in hand, at this point it will go all out. there is a splash of randomness in Ai so it will still often do whatever it freaking wants lol, you should notice a proformence increase from Ai in this aspect. no more giving unblockable to a creature in 2nd main.

please note, one of the recent previous revs broke cheat mode "unlock cards" in deck editor, i filed a bug report. its a probelm i was not able to fix myself so there is no fix included in this rev....i came across the bug while testing cheat mode stuff.
2010-11-28 20:55:04 +00:00
wagic.the.homebrew@gmail.com
52fce24bf8 Erwan
- Added AI Decks unlock system. Please update your graphics folder, and crossing fingers that Ilya B. is still around as I don't have the correct fonts.
2010-11-28 04:15:58 +00:00
omegablast2002@yahoo.com
62e1dfa0d0 last adjustment for today, promise...Ai will now use tappers/untappers religously based on card ranking. 2010-11-27 20:47:34 +00:00
omegablast2002@yahoo.com
0dae942cd0 final adjustment, moved a couple things in the foreach and altered a condiation to suit unknown foreachs, generally its always a good idea to use these cards, since thier effects only get better and better. 2010-11-27 19:56:00 +00:00
omegablast2002@yahoo.com
7c7280a8de forcing eff of ability modifying to 0 if creature already has it. 2010-11-27 19:29:18 +00:00
omegablast2002@yahoo.com
01d46fd0d1 changed the target checking function of lifer in Ai training, sometimes it would return the creature as the target and Ai would refuse to use it. 2010-11-27 18:53:52 +00:00
omegablast2002@yahoo.com
6467ab5aa8 reduced abilitymodify eff slightly increased base eff, added abilitygranted to activated. 2010-11-27 18:28:38 +00:00
omegablast2002@yahoo.com
e23e3d0728 more Ai training: use ability modifiers on creatures that dont already have the ability and prefferedly during first mains, use life altering cards as often as possible, improved foreach a little more, use untappers on card that are tapped that belong to Ai and tappers on cards that are not tapped that belong to player 2010-11-27 18:05:35 +00:00
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
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
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
techdragon.nguyen@gmail.com
acd7bb1aa4 reformatting code according to guidelines defined at
http://wololo.net/forum/viewtopic.php?f=35&t=2235&start=10
2010-11-16 00:55:16 +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
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
omegablast2002@yahoo.com
150c5f4c99 turned the "ai hint" for level up creatures into an MTGAbility.
this fixes a bug(?) that had high priority and maintains same effect as before. removed all traces of the "bugged(?) hint" from CardPrimitive.
Issue: 498
2010-10-31 17:19:20 +00:00
wrenczes
fadd36c0c4 More type conversion warning cleanup; some minor refactoring in the phase bar while I was cleaning up the warnings. 2010-10-28 06:57:34 +00:00
omegablast2002@yahoo.com
fbd5cffbbd taught told Ai bushido is a good thing. laid ground for Foreach lesson for Ai :) fixed yet another reported bug with aslongas. gave becomes( a better menu name system for the manlands to use.
it will now say "becomes [types]"
2010-10-25 14:41:09 +00:00
wrenczes
d5f3e4cfea Enabled precompiled headers for the build. This cuts the win compile time in debug by at least half on my laptop; on the psp compile, it shaves it down by ~ 45 seconds. I only did a cursory inspection of what to add to PrecompiledHeader.h, there's probably more that we can throw in there for more incremental speed improvements.
Also fixed the project includes so that we don't need to always use the indirect include path, ie:
#include "../include/foo.h" -> #include "foo.h"

I'm don't know much about make files - if I busted the linux build, mea culpa, but I think we're okay on that front too.  For future reference, here's the most straightforward link on the topic of adding pch support to make files:

http://www.mercs-eng.com/~hulud/index.php?2008/06/13/6-writing-a-good-makefile-for-a-c-project
2010-10-24 05:55:24 +00:00
omegablast2002@yahoo.com
8cb1f0cc7c moved the level varible from MTGcard to MTGprimitive. 2010-10-23 23:48:02 +00:00
omegablast2002@yahoo.com
a9e4c58af2 taught Ai how to use levelup creatures, taught Ai how to use Equip, taught Ai how to use prevent the cleric ability.
this is by no means absolutely perfect, i like it tho, and makes for some real good times with level up deck built with equips. 

you will notice i added a level=number...to the level up creatures, this has no effect on players, this is just a small hint to the Ai as to when it should stop investing mana in that creature. the chances are a little over half that ai will want to level a creature, increased ever so slightly with each level up.

for equipment, the Ai will now want to equip its best Creature(determined by power+toughness+convertedcost+how many abilities it has) and will want to equip these "better" cards atleast 2 times before it is reduced. same system for prevent damage, it will want to save its "better creature" more then a 1/1 token.

for both tho i added slight bonuses...
to equip, there is a higher chance that the ai will want to target a white creature, with an extra bonus if the creature is a 1/1 and nontoken. this is to encourage Ai to equip in white weenie decks

in prevent, there is a slight bonus if the creature is a 1/1 and the blocker/blockee has a power of 1. 

currently prevent damage treated this way is not coded for direct damage spell, sorry ! but for combat you will notice ai taking a stand and fighting back hard.
2010-10-23 22:34:07 +00:00
omegablast2002@yahoo.com
34580856d3 untaught Ai how to use prevent until someone with more knowledge then i can look at why the enum list wont allow for it to be listed. its commented out for now, and it works on PC just fine, not perfect but atleast Ai actually trys to keep all their creatures with atleast 1-3 prevent point on them during combat. the probelm it has is with compiling to PSPSDK, it doesnt like having STANDARD_PREVENT = 13, If someone could look into why it would dramatically help Ai using clerics. 2010-10-21 18:44:01 +00:00
omegablast2002@yahoo.com
42dca6dd88 fixed a line that PSPsdk didnt like. 2010-10-21 16:17:27 +00:00
omegablast2002@yahoo.com
18ff503bd9 fixed Ai not using regenerate during combat, taught Ai a little about prevent:number, changed "removepoison" mtgability to "alterpoison" as it made more sense. 2010-10-21 15:52:04 +00:00
techdragon.nguyen@gmail.com
5005f69a69 added current AI deck name to "start" menu while dueling 2010-10-13 15:24:52 +00:00
wrenczes@gmail.com
33e45c9635 More incremental work of converting code to use DebugTrace(). 2010-10-10 07:30:18 +00:00
techdragon.nguyen@gmail.com
8e83e0d632 Issue: 474
modified player status to recognize that test suite has been activated.  This is to allow deactivation of "phase skip automation" game setting during test suite.  
TODO: fix "Phase Skip Automation" such that if turned on the test suite does not break.  This fix should be considered temporary
2010-10-04 16:26:55 +00:00
wagic.the.homebrew@gmail.com
a6e4fba26b Erwan
- fix issue 304 (Momir + persist)
- some minor cleanup
2010-09-25 09:13:30 +00:00
omegablast2002@yahoo.com
5939cbded8 added MnGuyens further improved menu handling and extra options. 2010-09-17 06:34:12 +00:00
omegablast2002@yahoo.com
e65b3f223f Complete Overhaul of the cantcast abilities, changes in first comment. 2010-09-04 15:16:57 +00:00
omegablast2002@yahoo.com
c83950a5d4 storm,cantwin/lose,additionallands,cast restricting 2010-09-04 00:16:20 +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
77769c5e37 Erwan
- Fixed a bug with "must" abilities and the AI, such as Noggle Bridgebreaker
2010-02-06 04:34:09 +00:00
jean.chalard
0a083f4385 J :
* Fixes for compilation on 64-bit architectures :
  string position-returning functions return size_t, not uint.
  Fix that.
* Fixes warnings with new gcc about non-fixed string AND no arguments.

NOTE : 64-bit architectures still do not compile. There are 2 different places
where printf is used with a specifier that is not large enough on 64-bit because
size_t is now a ulong and not a uint. The solution on GNU systems is the %zu
specifier, but as I'm not sure it is supported on windows I don't want to
introduce a huge hard-to-notice bug, so I'll do it at a time when I got a
windowser to back me up.
2010-01-25 09:58:30 +00:00
wagic.the.homebrew@gmail.com
11ed497ebb Erwan
-fix issue 209 (Clone loops AI)
2010-01-15 16:49:17 +00:00
wagic.the.homebrew@gmail.com
cee2da600d Erwan
- fix a bug where the AI would crash when playing cards with cycling or any other "autohand" ability
2010-01-10 09:48:26 +00:00
wagic.the.homebrew@gmail.com
69c5dee979 Erwan
- IMPORTANT: Legendary is not an ability anymore, creating cards with super types should be much more natural. You can now say "type=Snow Land", and stuff like that. No backward compatibility!!!
2010-01-03 03:11:30 +00:00
wagic.the.homebrew@gmail.com
54142cc816 Erwan
- fix a segfault with Shivan Gorge
- Fix a memory leak in the AI
- Commit a test for issue 265
2009-12-22 13:11:08 +00:00
d32.wagic
002851a943 Daddy32: Tasks Mode
Gives the user the opportunity to earn some credits for performing various tasks.

Known bugs removed, tested stability-wise, not so much game-wise.
Lots of to-dos and ideas still remaining, better balance between task difficulty and their rewards needed - please comment.

Usage:
Enter shop, open menu, select 'See available tasks'.
All tasks in the list are active, until they expire ('Days left'; day passes after each duel (won, lost or quited)).
You can finish any of the tasks and get bonus. For particular task, the bonus gets a bit smaller every day (until expiration).
2009-12-13 22:12:14 +00:00
wagic.the.homebrew@gmail.com
512f649147 Erwan
- Adding cycling. Check Akroma's vengeance in ONS for an example. Note that this uses autohand instead of auto, this is important! You can also use autograveyard. 
- All "auto" activated abilities should work with autohand, so this is not only for cycling, but could be used for other abilities as well. For example autohand={3}:cycling can also be written autohand={3}{S}:Draw:1
2009-12-12 11:09:13 +00:00
wagic.the.homebrew@gmail.com
0d2c6cf3e5 Erwan
- Adding external rules mechanism. It is very crude for the moment, but I hope it will grow. Have a look at Rules/mtg.txt for basic usage
2009-12-06 04:47:29 +00:00
wagic.the.homebrew@gmail.com
ea3ed7061f Erwan
- Lords are now taken into account in AI statistics. (To display information, uncomment RENDER_AI_STATS in config.h)
- fixed a potential segfault with NoFizzle
2009-12-03 02:05:03 +00:00
wagic.the.homebrew@gmail.com
f924546dcc Erwan
- Code cleanup
- fix issue 142 . This will lead to other issues for some cards. These issues can be fixed by using targetcontroller/controller...etc
- Added a few cards
2009-11-21 09:40:14 +00:00
wagic.the.homebrew@gmail.com
f6a75a0e43 Erwan
- Fix issue 194
- Attempt at doing basic AI tests
2009-11-15 09:31:33 +00:00
wagic.the.homebrew@gmail.com
e059890446 Erwan
-reduced SFX Quality. This seems to fix the Bug with samples getting silent on the PSP (issue 112), and improves loading times. If you think this is unacceptable, let's discuss it
- AI now should play fetchlands' ability, although still not "efficiently"
- Fix a bug where the game would crash if a card has a valid alias to a hardcoded card that is in no _cards.dat (starwars mod cards aliasing a MTG card)
2009-11-12 11:39:47 +00:00
wagic.the.homebrew@gmail.com
1d20f37ded Erwan
- fix issue 151 (I hope)
- small french translation Update
- Nezumi Cutthroat fix
2009-11-03 03:51:05 +00:00
wagic.the.homebrew@gmail.com
273b0672e4 Erwan
- various optimization fixes
2009-10-19 11:37:47 +00:00
wagic.the.homebrew@gmail.com
6f159fb39c Erwan - cache fixes - Code review highly appreciated, please criticize my code!
- fix issue 65 (quads when no image  load slowly in shop/deck editor)
- Possibly fix issue 92, please let me know if it reproduces
- Fix issue 97 (Deck editor: weird behavior of deck display)
- Fix issue 39 - please verify
- Issue 56 can probably be closed as well
- Fix issue 86
2009-10-13 14:16:30 +00:00
wagic.the.homebrew@gmail.com
b2b88f1f23 Erwan
-fix issue 76. There's a huge performance cost for this fix, I hope it won't show too much in the PSP version.
2009-10-04 10:52:13 +00:00
wagic.the.homebrew@gmail.com
61cb849d33 Erwan
-attempt at issue 81. It will do for now
2009-10-04 08:39:34 +00:00