diff --git a/Mage.Client/plugins/mage-player-ai.jar b/Mage.Client/plugins/mage-player-ai.jar index ccdd612fd71..70f17479299 100644 Binary files a/Mage.Client/plugins/mage-player-ai.jar and b/Mage.Client/plugins/mage-player-ai.jar differ diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java index 1eb740bd192..b70c3817537 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java @@ -134,29 +134,32 @@ public class RateCard { private synchronized static void readRatings() { if (ratings == null) { ratings = new HashMap(); - String filename = "/ratings.txt"; - try { - InputStream is = RateCard.class.getResourceAsStream(filename); - Scanner scanner = new Scanner(is); - while (scanner.hasNextLine()) { - String line = scanner.nextLine(); - String[] s = line.split(":"); - if (s.length == 2) { - Integer rating = Integer.parseInt(s[0].trim()); - String name = s[1].trim(); - if (rating > max) { - max = rating; - } - if (rating < min) { - min = rating; - } - ratings.put(name, rating); + readFromFile("/m13.csv"); + } + } + + private static void readFromFile(String path) { + try { + InputStream is = RateCard.class.getResourceAsStream(path); + Scanner scanner = new Scanner(is); + while (scanner.hasNextLine()) { + String line = scanner.nextLine(); + String[] s = line.split(":"); + if (s.length == 2) { + Integer rating = Integer.parseInt(s[1].trim()); + String name = s[0].trim(); + if (rating > max) { + max = rating; } + if (rating < min) { + min = rating; + } + ratings.put(name, rating); } - } catch (Exception e) { - e.printStackTrace(); - ratings.clear(); // no rating available on exception } + } catch (Exception e) { + e.printStackTrace(); + ratings.clear(); // no rating available on exception } } diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/resources/m13.csv b/Mage.Server.Plugins/Mage.Player.AI/src/main/resources/m13.csv new file mode 100644 index 00000000000..857064c6863 --- /dev/null +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/resources/m13.csv @@ -0,0 +1,234 @@ +Ajani Caller of the Pride:1500 +Garruk Primal Hunter:1496 +Sublime Archangel:1491 +Jace Memory Adept:1487 +Thundermaw Hellkite:1483 +Akromas Memorial:1479 +Liliana of the Dark Realms:1474 +Chandra the Firebrand:1470 +Nicol Bolas Planeswalker:1466 +Elderscale Wurm:1462 +Primordial Hydra:1457 +Vampire Nocturnus:1453 +Serra Avatar:1449 +Nefarox Overlord of Grixis:1444 +Odric Master Tactician:1440 +Thragtusk:1436 +Captain of the Watch:1432 +Talrand Sky Summoner:1427 +Krenko Mob Boss:1423 +Yeva Natures Herald:1419 +Xathrid Gorgon:1415 +Silklash Spider:1410 +Staff of Nin:1406 +Vampire Nighthawk:1402 +Serra Avenger:1397 +Oblivion Ring:1393 +Sphinx of Uthuun:1389 +Rancor:1385 +Firewing Phoenix:1380 +Mutilate:1376 +Magmaquake:1372 +Disciple of Bolas:1368 +Serra Angel:1363 +Intrepid Hero:1359 +Stuffy Doll:1355 +Shimian Specter:1350 +Rhox Faithmender:1346 +Predatory Rampage:1342 +Clone:1338 +Talrands Invocation:1333 +Sands of Delirium:1329 +Cathedral of War:1325 +Slumbering Dragon:1321 +Flames of the Firebrand:1316 +Quirion Dryad:1312 +Volcanic Geyser:1308 +Knight of Glory:1303 +Stormtide Leviathan:1299 +Knight of Infamy:1295 +Void Stalker:1291 +Planar Cleansing:1286 +Garruks Packleader:1282 +Switcheroo:1278 +Gilded Lotus:1274 +Hamletback Goliath:1269 +Acidic Slime:1265 +Trading Post:1261 +Arctic Aven:1256 +Roaring Primadox:1252 +Public Execution:1248 +Arms Dealer:1244 +Sleep:1239 +Elvish Archdruid:1235 +Murder:1231 +Master of the Pearl Trident:1226 +Crusader of Odric:1222 +Healer of the Pride:1218 +Duskmantle Prowler:1214 +Searing Spear:1209 +Pacifism:1205 +Mwonvuli Beast Tracker:1201 +Fog Bank:1197 +Rise from the Grave:1192 +Jaces Phantasm:1188 +Augur of Bolas:1184 +Flinthoof Boar:1179 +Furnace Whelp:1175 +Harbor Bandit:1171 +Prized Elephant:1167 +Aven Squire:1162 +Hellion Crucible:1158 +Dragonskull Summit:1154 +Attended Knight:1150 +Mindclaw Shaman:1145 +Drowned Catacomb:1141 +Cower in Fear:1137 +Sunpetal Grove:1132 +Sentinel Spider:1128 +Duskdale Wurm:1124 +Glacial Fortress:1120 +Omniscience:1115 +Rootbound Crag:1111 +Faiths Reward:1107 +Worldfire:1103 +War Priest of Thune:1098 +Bloodhunter Bat:1094 +Angelic Benediction:1090 +Diabolic Revelation:1085 +Divine Verdict:1081 +Crimson Muckwader:1077 +Ring of Kalonia:1073 +Phylactery Lich:1068 +Fervor:1064 +Chronomaton:1060 +Deadly Recluse:1056 +Primal Clay:1051 +Mark of Mutiny:1047 +Ring of Xathrid:1043 +Welkin Tern:1038 +Servant of Nefarox:1034 +Evolving Wilds:1030 +Essence Drain:1026 +Prey Upon:1021 +Elvish Visionary:1017 +Primal Huntbeast:1013 +Griffin Protector:1009 +Faerie Invaders:1004 +Ajanis Sunstriker:1000 +Wind Drake:996 +Captains Call:991 +Arbor Elf:987 +Timberpack Wolf:983 +Turn to Slag:979 +Ring of Thune:974 +Duty Bound Dead:970 +Giant Scorpion:966 +Centaur Courser:962 +Rewind:957 +Fungal Sprouting:953 +Bladetusk Boar:949 +Encrust:944 +Ring of Evos Isle:940 +Yevas Forcemage:936 +Krenkos Command:932 +Archaeomancer:927 +Guardians of Akrasa:923 +Essence Scatter:919 +Ring of Valkas:915 +Ravenous Rats:910 +Tormented Soul:906 +Farseek:902 +Spelltwine:897 +Unsummon:893 +Lilianas Shade:889 +Scroll Thief:885 +Spiked Baloth:880 +Titanic Growth:876 +Mogg Flunkies:872 +Kitesail:868 +Goblin Arsonist:863 +Divination:859 +Sign in Blood:855 +Redirect:850 +Veilborn Ghoul:846 +Battleflight Eagle:842 +War Falcon:838 +Mark of the Vampire:833 +Chandras Fury:829 +Mind Sculpt:825 +Vedalken Entrancer:821 +Courtly Provocateur:816 +Reverberate:812 +Torch Fiend:808 +Crippling Blight:803 +Rummaging Goblin:799 +Elixir of Immortality:795 +Bond Beetle:791 +Silvercoat Lion:786 +Watercourser:782 +Walking Corpse:778 +Dragon Hatchling:774 +Reckless Brute:769 +Tricks of the Trade:765 +Warclamp Mastiff:761 +Vile Rebirth:756 +Vastwood Gorger:752 +Bloodthrone Vampire:748 +Kraken Hatchling:744 +Plummet:739 +Canyon Minotaur:735 +Downpour:731 +Mind Rot:726 +Goblin Battle Jester:722 +Dark Favor:718 +Fire Elemental:714 +Jayemdae Tome:709 +Show of Valor:705 +Safe Passage:701 +Duress:697 +Negate:692 +Rangers Path:688 +Cleaver Riot:684 +Naturalize:679 +Volcanic Strength:675 +Gem of Becoming:671 +Divine Favor:667 +Pillarfield Ox:662 +Disentomb:658 +Zombie Goliath:654 +Guardian Lions:650 +Glorious Charge:645 +Blood Reckoning:641 +Harbor Serpent:637 +Fog:632 +Kindled Fury:628 +Wild Guess:624 +Trumpet Blast:620 +Wall of Fire:615 +Phyrexian Hulk:611 +Index:607 +Serpents Gift:603 +Merfolk of the Pearl Trident:598 +Rain of Blades:594 +Revive:590 +Smelt:585 +Hydrosurge:581 +Erase:577 +Craterize:573 +Angels Mercy:568 +Bountiful Harvest:564 +Boundless Realms:560 +Touch of the Eternal:556 +Ground Seal:551 +Wits End:547 +Reliquary Tower:543 +Tormods Crypt:538 +Door to Nothingness:534 +Battle of Wits:530 +Clock of Omens:526 +Forest:521 +Swamp:517 +Mountain:513 +Plains:509 +Island:504 \ No newline at end of file diff --git a/Mage.Server/plugins/mage-player-ai.jar b/Mage.Server/plugins/mage-player-ai.jar index 152af7c1b83..8dfc3c893e3 100644 Binary files a/Mage.Server/plugins/mage-player-ai.jar and b/Mage.Server/plugins/mage-player-ai.jar differ