Warstorm Clone
So far a direct and hopefully exact clone of Warstorm the trading card game.
by cagito
HTML
<body onmousedown="event.preventDefault();" onload="Engine();"><!--
----------------------Date : Wednesday July 31st 2013 3:15am - 4:29am 1h 14m
6:10pm - 6:30 20m
Initial Card Layout - Started, basic design ==== Done.
Initial layout - Now handles missing cards from list. Don't need card numbers in order now ==== Done.
7:30pm - 8:18pm 48m
Initial layout edit - Added text boxex to cards. Can have top border or not,bottom too, straight or rounded corners. Also smaller font sizes. Fits 80+ characters in text box - More stuff to do here. ==== Done.
Initial layout edit - Added wait display circle. Can handle 0 to 99 without didsplay issues. ==== Done.
Initial layout edit - Added drag capabilities to the display so all can be lined up across the window size. ==== Done.
----------------------Date: Thursday August 1st 2013
12:15am-12:25am 10m
Changed the display function so you can now select location as well as provide the card array to put all the displayed cards into, as well as providing a custom card array either consisting of the entire card_list or only selected ones as in cards selected to be in a deck only. ==== Done.
----------------------Date: Friday August 2nd 2013
12:28am - 2:37am 2h 9m
Inital layout - Added player and opponent boards, and hands, overlapped hand displays. Made card names clipped just before card edge, added 3 other card sections, changed positioning of the 4 card sections, move card names and wait display number to the left instead of right. - Done , need to add in deck and graveyard dispays. ==== Done.
3:45am - 3:56am 11m
Initial layout - Added player and opponents deck display with number remaining. ==== Done.
7:15pm - 7:27 12m
Initial layout - Added player and opponents graveyards with number in graveyard. ==== Done.
10:15pm - 10:59pm 44m
Game engine - Added starting game on click. ==== Done.
10:59pm - 12:10am 1h 11m
Game engine - Added Opponent drawing out deck for tests. ==== Done.
----------------------Date: Friday August...
JavaScript
var opponent_card_grave = [];//holds the actual cards in graveyard information
var opponent_card_array = [];//holds the actual cards on board information
var opponent_card_hand_array = [];//holds the actual cards in hand information
var opponent_artifacts_card_wait_array=[];//the artifacts actual cards info for artifacts in waitying area.
var opponent_artifacts_card_board_array=[];//the artifacts actual cards info for field display.
var opponent_morale_value = 200;//opponents moral amount
var opponent_board_array = [];//the array to hold the board divs
var player_card_grave = [];//holds the actual cards on graveyard information
var player_card_array = [];//holds the actual cards in board information
var player_card_hand_array = [];//holds the actual cards in hand information
var player_artifacts_card_wait_array=[];//the artifacts actual cards info for artifacts in waitying area.
var player_artifacts_card_board_array=[];//the artifact actual cards info for field display.
var player_morale_value = 200;//players morale amount.
var player_board_array = [];//the array to hold the board divs
var Whos_turn;//the whos turn variable can be 'opponent' or 'player' only
var card_cycler;//just a variable used for cycling through cards
var Game_Speed=1000;//controls the speed of each step in the battle. 1000 = 1 second.
var Turns_At=0;//the starting turn
//var big_display;// the full card display.
var difference;
var difference_array = [];
card_list = {//this is the actual card list used as a reference only. None of these are changed while the program runs. except from within an editor inside the program.
0: {
name: 'Aandan Rider',
wait : 0,
attack : 2,
health : 10,
card_type : 'unit',
cardtext: 'Blah blah blah blah hmmi this shit is kind of cool.',
abilities : {
0 : {
name : 'Block',
value : 1,
physical_reduction : 1
}
}
},
1: {
name: 'Aandan Longbow',
wait : 3,
attack : 3,
health : 5,
card_type :...