big changes coming...

This commit is contained in:
Kyle
2020-03-19 21:00:40 -07:00
parent fbe849564e
commit 92501e4ecb
366 changed files with 6136 additions and 1843 deletions

View File

@@ -1,45 +0,0 @@
//Cycles through a rainbow!
setInterval(changeColor, 250)
var regularAdjust = 0//60
var lightAdjust = 64//100
var lightLead = 255
var currentColorIndex = 0
function changeColor() {
var colors = indexToColor(currentColorIndex)
document.documentElement.style.setProperty("--shifting-color-1", "rgb(" + parseInt(colors[0] + regularAdjust) + "," + parseInt(colors[1] + regularAdjust) + "," + parseInt(colors[2] + regularAdjust) + ")")
var lightColors = indexToColor(currentColorIndex + lightLead)
document.documentElement.style.setProperty("--shifting-color-1-light", "rgb(" + parseInt(lightColors[0] + lightAdjust) + "," + parseInt(lightColors[1] + lightAdjust) + "," + parseInt(lightColors[2] + lightAdjust) + ")")
currentColorIndex += 2.5 * 153 / 180 //The second number is how many seconds it takes to do a full loop
}
function indexToColor(colorIndex) {
var red = 0, green = 0, blue = 0
var realColorIndex = colorIndex - Math.floor(colorIndex / 1530) * 1530
var colorStage = Math.floor(realColorIndex / 255)
switch(colorStage) {
case 0:
green = 255
red = realColorIndex - Math.floor(realColorIndex / 255) * 255
break
case 1:
red = 255
green = 255 - realColorIndex + Math.floor(realColorIndex / 255) * 255
break
case 2:
red = 255
blue = realColorIndex - Math.floor(realColorIndex / 255) * 255
break
case 3:
blue = 255
red = 255 - realColorIndex + Math.floor(realColorIndex / 255) * 255
break
case 4:
blue = 255
green = realColorIndex - Math.floor(realColorIndex / 255) * 255
break
case 5:
green = 255
blue = 255 - realColorIndex + Math.floor(realColorIndex / 255) * 255
break
}
return [red, green, blue]
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,106 +0,0 @@
/*
This is a list of set codes.
It has all been typed manually, so there are possibly errors, but let's hope not!
Duplicates found and removed: ORI, W17, CED
Sets not found: Astral, Deckmasters, Duels of the Planeswalkers
The codes have been resourced from the following:
https://en.wikipedia.org/wiki/List_of_Magic:_The_Gathering_sets
and
https://magic.wizards.com/en/products/card-set-archive
Last updated: 9-8-19
Last set added: C19
*/
//Common through Rare
var setCodeListPreMythic = ['1E', '2E', '2U', '3E', '4E', '5E', '6E', '7E', '8ED', '9ED', '10E', 'AN',
'AQ', 'LE', 'DK', 'FE', 'HM', 'IA', 'AL', 'MI', 'VI', 'WL', 'TE', 'ST', 'EX', 'UZ', 'GU', 'AP', 'OD',
'TOR', 'JUD', 'ONS', 'LGN', 'SCG', 'MRD', 'DST', '5DN', 'CHK', 'BOK', 'SOK', 'RAV', 'GPT', 'DIS', 'CSP',
'TSP', 'PLC', 'FUT', 'LRW', 'MOR', 'SHM', 'EVE', 'PO', 'P2', 'PK', 'P3', 'P4', 'CH', 'BR', 'BD', 'EVG',
'UG', 'UNH', 'MED', 'ME2', 'ME3', 'ME4', 'HOP']
//Common through Mythic
var setCodeListPostMythic = ['M10', 'M11', 'M12', 'M13', 'M14', 'M15', 'ORI', 'M19', 'ALA', 'CON',
'ARB', 'ZEN', 'WWK', 'ROE', 'SOM', 'MBS', 'NPH', 'ISD', 'DKA', 'AVR', 'RTR', 'GTC', 'DGM', 'THS', 'BNG',
'JOU', 'KTK', 'FRF', 'DTK', 'BFZ', 'OGW', 'SOI', 'EMN', 'KLD', 'AER', 'AKH', 'HOU', 'XLN', 'RIX', 'DOM',
'GRN', 'RNA', 'MH1', 'GS1', 'MD1', 'DD2', 'DDC', 'DDD', 'DDE', 'DDF', 'DDG', 'DDH', 'DDI', 'DDJ', 'DDK',
'DDL', 'DDM', 'DDN', 'DDP', 'DDQ', 'DDR', 'DDS', 'DDT', 'DDU', 'SS1', 'H09', 'PD2', 'PD3', 'MMA', 'MM2',
'EMA', 'MM3', 'IMA', 'A25', 'UMA', 'PC2', 'PCA', 'ARC', 'E01', 'CMD', 'CM1', 'C13', 'C14', 'C15',
'C16', 'CMA', 'C17', 'CM2', 'C18', 'CNS', 'CN2', 'E02', 'BBD', 'UST', 'VMA', 'TPR', 'W16', 'W17',
'GK1_IZZET', 'GK1_SELESN', 'GK1_BOROS', 'GK1_GOLGAR', 'GK2_RAKDOS', 'GK2_AZORIU', 'GK2_SIMIC',
'GK2_GRUUL', 'GK2_ORZHOV', 'WAR', 'M20', 'C19']
//Only Rare
var setCodeListRareOnly = ['DRB']
//Only Mythic
var setCodeListMythicOnly = ['V09', 'V10', 'V11', 'V12', 'V13', 'V14', 'V15', 'V16', 'V17', 'EXP', 'MPS_GRN']
//Only Special
var setCodeListSpecialOnly = ['MPS_KLD', 'MPS_AKH']
//Only Rare / Mythic
var setCodeListRareMythicOnly = ['SS2']
// randomSet(false)
function randomSet(updateHTML = true) {
var totalSetCount = setCodeListPreMythic.length + setCodeListPostMythic.length + setCodeListRareOnly.length + setCodeListMythicOnly.length + setCodeListSpecialOnly.length + setCodeListRareMythicOnly.length
var setIndex = Math.floor(Math.random() * (totalSetCount - 1))
var possibleRarities, rarity, set
if (setIndex < setCodeListPreMythic.length) {
set = setCodeListPreMythic[setIndex]
possibleRarities = ["C", "U", "R"]
} else {
setIndex -= setCodeListPreMythic.length
if (setIndex < setCodeListPostMythic.length) {
set = setCodeListPostMythic[setIndex]
possibleRarities = ["C", "U", "R", "M"]
} else {
setIndex -= setCodeListPostMythic.length
if (setIndex < setCodeListRareOnly.length) {
set = setCodeListRareOnly[setIndex]
possibleRarities = ["R"]
} else {
setIndex -= setCodeListRareOnly.length
if (setIndex < setCodeListMythicOnly.length) {
set = setCodeListMythicOnly[setIndex]
possibleRarities = ["M"]
} else {
setIndex -= setCodeListMythicOnly.length
if (setIndex < setCodeListSpecialOnly.length) {
set = setCodeListSpecialOnly[setIndex]
possibleRarities = ["S"]
} else {
setIndex -= setCodeListSpecialOnly.length
if (setIndex < setCodeListRareMythicOnly.length) {
set = setCodeListRareMythicOnly[setIndex]
possibleRarities = ["M", "R"]
} else {
return
}
}
}
}
}
}
var findingRarity = true
while (findingRarity) {
switch(Math.floor(Math.random() * 5)) {
case 4:
rarity = "S"
break
case 3:
rarity = "M"
break
case 2:
rarity = "R"
break
case 1:
rarity = "U"
break
default:
rarity = "C"
}
if (possibleRarities.includes(rarity)) {
findingRarity = false
}
}
if (updateHTML) {
document.getElementById("inputSetCode").value = set
document.getElementById("inputSetRarity").value = rarity
}
setSymbol.src = "https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=" + set + "&size=large&rarity=" + rarity
}

View File

@@ -2156,7 +2156,7 @@ Sortable.prototype =
if (moved && !awaitingDragStarted) {
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
//code added by me (Kyle) starts here!
cardMasterUpdated()
drawCardObjects()
//code added by me (Kyle) ends here!
}

View File

@@ -0,0 +1,24 @@
var versionM15ImageList = [
['White Frame', 'data/images/m15/m15FrameW.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)']],
['Blue Frame', 'data/images/m15/m15FrameU.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)']],
['Black Frame', 'data/images/m15/m15FrameB.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)']],
['Red Frame', 'data/images/m15/m15FrameR.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)']],
['Green Frame', 'data/images/m15/m15FrameG.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)']]
]
var versionM15MaskList = [['Right Half', 'data/images/maskRightHalf.png'], ['Pinline (m15)', 'data/images/m15/m15MaskPinline.png'], ['Full', 'data/images/maskFull.png']]
if (!loadedVersions.includes('m15')) {
loadedVersions.push("m15")
loadMaskImages(versionM15MaskList)
loadFrameImages(versionM15ImageList)
}
loadTextOptions([
new cardText('Card Title', 'Awesome Card Tho!!!', 0.1, 0.1, 0.8, 0.8, 'belerenb', 0.0177, 'black'),
new cardText('Card Type', '', 0.1, 0.1, 0.8, 0.8, 'belerenb', 0.0177, 'black'),
new cardText('Rules Text', '', 0.1, 0.1, 0.8, 0.8, 'mplantin', 0.0177, 'black'),
new cardText('Power/Toughness', '', 0.1, 0.1, 0.8, 0.8, 'mplantin', 0.0177, 'black')
])
artX = 0
artY = 0
artWidth = 1500
artHeight = 500