planeswalker dark things

This commit is contained in:
Kyle
2020-02-16 11:46:25 -08:00
parent 31f821a037
commit 828773cb22
5 changed files with 36 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@@ -6,4 +6,6 @@ Red,planeswalker/m15RPlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-7
Green,planeswalker/m15GPlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker Green,planeswalker/m15GPlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker
Multicolored,planeswalker/m15MPlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker Multicolored,planeswalker/m15MPlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker
Artifact,planeswalker/m15APlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker Artifact,planeswalker/m15APlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker
Colorless,planeswalker/m15CPlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker Colorless,planeswalker/m15CPlaneswalker.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039,Planeswalker
Dark Twins,planeswalker/darkTwins.png,Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039,Planeswalker
Border,masks/borderPlaneswalker.png,Full-0-0-744-1039;Border Planeswalker-0-0-744-1039,Planeswalker
1 displayName imagePath maskOptions framePickerOptions
6 Green planeswalker/m15GPlaneswalker.png Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039 Planeswalker
7 Multicolored planeswalker/m15MPlaneswalker.png Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039 Planeswalker
8 Artifact planeswalker/m15APlaneswalker.png Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039 Planeswalker
9 Colorless planeswalker/m15CPlaneswalker.png Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039;Pinline Planeswalker-0-0-744-1039;Frame Planeswalker-0-0-744-1039;Loyalty Planeswalker-0-0-744-1039 Planeswalker
10 Dark Twins planeswalker/darkTwins.png Full-0-0-744-1039;Title Planeswalker-0-0-744-1039;Type Planeswalker-0-0-744-1039 Planeswalker
11 Border masks/borderPlaneswalker.png Full-0-0-744-1039;Border Planeswalker-0-0-744-1039 Planeswalker

View File

@@ -57,7 +57,8 @@ if (!version.addedPlaneswalker) {
Four: <input type="number" class="input number" id="inputPlaneswalker4" oninput="planeswalkerAbilities()" value="0" min="0" max="1039"><input type="text" class="input text" id="inputPlaneswalker4Icon" oninput="planeswalkerAbilities()" value="-9"><br> Four: <input type="number" class="input number" id="inputPlaneswalker4" oninput="planeswalkerAbilities()" value="0" min="0" max="1039"><input type="text" class="input text" id="inputPlaneswalker4Icon" oninput="planeswalkerAbilities()" value="-9"><br>
For two-ability Planeswalkers only:<br> For two-ability Planeswalkers only:<br>
<input type="checkbox" onchange="changePlaneswalkerAbilityLayout()" id="inputWARSpacing"> Use War of the Spark ability spacing<br> <input type="checkbox" onchange="changePlaneswalkerAbilityLayout()" id="inputWARSpacing"> Use War of the Spark ability spacing<br>
<input type="checkbox" onchange="changePlaneswalkerAbilityLayout()" id="inputWARReverse"> Reverse War of the Spark ability spacing` <input type="checkbox" onchange="changePlaneswalkerAbilityLayout()" id="inputWARReverse"> Reverse War of the Spark ability spacing<br>
<input type="checkbox" onchange="invertPlaneswalkerColors()" id="inputColorInvert"> Dark ability boxes`
document.getElementById("cardMenu").appendChild(planeswalkerTab) document.getElementById("cardMenu").appendChild(planeswalkerTab)
newCanvas("planeswalker"); newCanvas("planeswalker");
var planeswalkerPlus = new Image() var planeswalkerPlus = new Image()
@@ -74,9 +75,21 @@ if (!version.addedPlaneswalker) {
lightToDarkPlaneswalker.src = "data/images/planeswalker/abilityLineOdd.png" lightToDarkPlaneswalker.src = "data/images/planeswalker/abilityLineOdd.png"
var darkToLightPlaneswalker = new Image() var darkToLightPlaneswalker = new Image()
darkToLightPlaneswalker.crossOrigin = "anonymous"; darkToLightPlaneswalker.crossOrigin = "anonymous";
darkToLightPlaneswalker.onload = function() {planeswalkerAbilities()} //darkToLightPlaneswalker.onload = function() {planeswalkerAbilities()}
darkToLightPlaneswalker.src = "data/images/planeswalker/abilityLineEven.png" darkToLightPlaneswalker.src = "data/images/planeswalker/abilityLineEven.png"
var lightToDarkPlaneswalkerDarkened= new Image()
lightToDarkPlaneswalkerDarkened.crossOrigin = "anonymous";
lightToDarkPlaneswalkerDarkened.src = "data/images/planeswalker/abilityLineOddDarkened.png"
var darkToLightPlaneswalkerDarkened = new Image()
darkToLightPlaneswalkerDarkened.crossOrigin = "anonymous";
darkToLightPlaneswalkerDarkened.onload = function() {invertPlaneswalkerColors()}
darkToLightPlaneswalkerDarkened.src = "data/images/planeswalker/abilityLineEvenDarkened.png"
setTimeout(planeswalkerAbilities, 1000); setTimeout(planeswalkerAbilities, 1000);
//placeholders:
var darkColor = "#a4a4a4";
var lightColor = "white";
var planeswalkerLightToDark = new Image()
var planeswalkerDarkToLight = new Image()
} }
m15PlaneswalkerBottomInfo() m15PlaneswalkerBottomInfo()
@@ -121,20 +134,20 @@ function planeswalkerTextFunction() {
lastAdjust = 2 * cardHeight lastAdjust = 2 * cardHeight
} }
if (i % 2 == 1) { if (i % 2 == 1) {
planeswalkerContext.fillStyle = "white" planeswalkerContext.fillStyle = lightColor
planeswalkerContext.globalAlpha = 0.608 planeswalkerContext.globalAlpha = 0.608
planeswalkerContext.fillRect(scale(91), window["ability" + i + "Y"] + scale(10), scale(599), window["ability" + (i + 1) + "Y"] - window["ability" + i + "Y"] - scale(20) + lastAdjust) planeswalkerContext.fillRect(scale(91), window["ability" + i + "Y"] + scale(10), scale(599), window["ability" + (i + 1) + "Y"] - window["ability" + i + "Y"] - scale(20) + lastAdjust)
if (i == 1 && planeswalkerAbilityCount != 1) { if (i == 1 && planeswalkerAbilityCount != 1) {
planeswalkerContext.fillRect(scale(91), window["ability" + i + "Y"], scale(599), scale(10)) planeswalkerContext.fillRect(scale(91), window["ability" + i + "Y"], scale(599), scale(10))
} }
planeswalkerContext.globalAlpha = 1 planeswalkerContext.globalAlpha = 1
planeswalkerContext.drawImage(lightToDarkPlaneswalker, scale(91), window["ability" + (i + 1) + "Y"] - scale(10) + lastAdjust, scale(599), scale(20)) planeswalkerContext.drawImage(planeswalkerLightToDark, scale(91), window["ability" + (i + 1) + "Y"] - scale(10) + lastAdjust, scale(599), scale(20))
} else { } else {
planeswalkerContext.fillStyle = "#a4a4a4" planeswalkerContext.fillStyle = darkColor
planeswalkerContext.globalAlpha = 0.706 planeswalkerContext.globalAlpha = 0.706
planeswalkerContext.fillRect(scale(91), window["ability" + i + "Y"] + scale(10), scale(599), window["ability" + (i + 1) + "Y"] - window["ability" + i + "Y"] - scale(20) + lastAdjust) planeswalkerContext.fillRect(scale(91), window["ability" + i + "Y"] + scale(10), scale(599), window["ability" + (i + 1) + "Y"] - window["ability" + i + "Y"] - scale(20) + lastAdjust)
planeswalkerContext.globalAlpha = 1 planeswalkerContext.globalAlpha = 1
planeswalkerContext.drawImage(darkToLightPlaneswalker, scale(91), window["ability" + (i + 1)+ "Y"] - scale(10) + lastAdjust, scale(599), scale(20)) planeswalkerContext.drawImage(planeswalkerDarkToLight, scale(91), window["ability" + (i + 1)+ "Y"] - scale(10) + lastAdjust, scale(599), scale(20))
} }
} }
planeswalkerContext.globalCompositeOperation = "destination-in" planeswalkerContext.globalCompositeOperation = "destination-in"
@@ -171,3 +184,17 @@ function changePlaneswalkerAbilityLayout() {
} }
planeswalkerAbilities() planeswalkerAbilities()
} }
function invertPlaneswalkerColors() {
if (document.getElementById("inputColorInvert").checked) {
darkColor = "#5b5b5b"
lightColor = "black"
planeswalkerLightToDark.src = lightToDarkPlaneswalkerDarkened.src
planeswalkerDarkToLight.src = darkToLightPlaneswalkerDarkened.src
} else {
darkColor = "#a4a4a4"
lightColor = "white"
planeswalkerLightToDark.src = lightToDarkPlaneswalker.src
planeswalkerDarkToLight.src = darkToLightPlaneswalker.src
}
planeswalkerAbilities();
}