Highlight pomanders when they are used on a floor
This commit is contained in:
parent
e1ef49e33b
commit
cf66eb2378
10
src/App.css
10
src/App.css
@ -12,6 +12,16 @@
|
|||||||
width:56px;
|
width:56px;
|
||||||
height:56px;
|
height:56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dotused {
|
||||||
|
background-color:rgba(0,0,0,0.0);
|
||||||
|
border:4px solid rgba(255,255,150,0.9);
|
||||||
|
border-radius:50%;
|
||||||
|
-moz-border-radius:50%;
|
||||||
|
-webkit-border-radius:50%;
|
||||||
|
width:56px;
|
||||||
|
height:56px;
|
||||||
|
}
|
||||||
.smoldotgreen {
|
.smoldotgreen {
|
||||||
background-color:rgba(0,0,0,0.0);
|
background-color:rgba(0,0,0,0.0);
|
||||||
border:4px solid rgba(150,255,150,0.8);
|
border:4px solid rgba(150,255,150,0.8);
|
||||||
|
@ -12,6 +12,25 @@
|
|||||||
width:56px;
|
width:56px;
|
||||||
height:56px;
|
height:56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dotused {
|
||||||
|
background-color:rgba(0,0,0,0.0);
|
||||||
|
border:4px solid rgba(255,255,150,0.6);
|
||||||
|
border-radius:50%;
|
||||||
|
-moz-border-radius:50%;
|
||||||
|
-webkit-border-radius:50%;
|
||||||
|
width:56px;
|
||||||
|
height:56px;
|
||||||
|
}
|
||||||
|
.smoldotgreen {
|
||||||
|
background-color:rgba(0,0,0,0.0);
|
||||||
|
border:4px solid rgba(150,255,150,0.8);
|
||||||
|
border-radius:50%;
|
||||||
|
-moz-border-radius:50%;
|
||||||
|
-webkit-border-radius:50%;
|
||||||
|
width:48px;
|
||||||
|
height:52px;
|
||||||
|
}
|
||||||
.smoldot {
|
.smoldot {
|
||||||
background-color:rgba(0,0,0,0.0);
|
background-color:rgba(0,0,0,0.0);
|
||||||
border:4px solid rgba(255,150,150,0.8);
|
border:4px solid rgba(255,150,150,0.8);
|
||||||
|
10
src/App.js
10
src/App.js
@ -52,11 +52,13 @@ function App() {
|
|||||||
(key==="raising"&&i===14)||
|
(key==="raising"&&i===14)||
|
||||||
(key==="resolution"&&i===15)) {
|
(key==="resolution"&&i===15)) {
|
||||||
if (data.floor_storage[key]>0) {
|
if (data.floor_storage[key]>0) {
|
||||||
return true
|
return 1
|
||||||
|
} else {
|
||||||
|
return 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return 0
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -69,7 +71,7 @@ function App() {
|
|||||||
{
|
{
|
||||||
data.pomander.map((pom,i)=>{
|
data.pomander.map((pom,i)=>{
|
||||||
return <>
|
return <>
|
||||||
{NameMatches(i)&&<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>}
|
{NameMatches(i)==1?<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>:NameMatches(i)==2&&<div className="floating dotused" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>}
|
||||||
<div className="floating current" style={{left:48+(i%6)*64,top:80+Math.floor(i/6)*64,fontSize:24}}>
|
<div className="floating current" style={{left:48+(i%6)*64,top:80+Math.floor(i/6)*64,fontSize:24}}>
|
||||||
{pom[1]}</div>
|
{pom[1]}</div>
|
||||||
<div className="floating alltime" style={{left:48+(i%6)*64,top:104+Math.floor(i/6)*64,fontSize:24}}>
|
<div className="floating alltime" style={{left:48+(i%6)*64,top:104+Math.floor(i/6)*64,fontSize:24}}>
|
||||||
@ -114,7 +116,7 @@ function App() {
|
|||||||
<div className="floating current" style={{left:345-CenterAlignAdjust(data.death_count[0],32),top:416,fontSize:32}}>
|
<div className="floating current" style={{left:345-CenterAlignAdjust(data.death_count[0],32),top:416,fontSize:32}}>
|
||||||
{data.death_count[0]}</div>
|
{data.death_count[0]}</div>
|
||||||
<div className="floating alltime" style={{left:422-CenterAlignAdjust(data.death_count[0],32),top:464,fontSize:32}}>
|
<div className="floating alltime" style={{left:422-CenterAlignAdjust(data.death_count[0],32),top:464,fontSize:32}}>
|
||||||
{data.death_count[0]}</div>
|
{data.death_count[1]}</div>
|
||||||
{
|
{
|
||||||
data.floor_effects.map((eff,i)=>{
|
data.floor_effects.map((eff,i)=>{
|
||||||
return <>
|
return <>
|
||||||
|
@ -52,11 +52,13 @@ function App() {
|
|||||||
(key==="raising"&&i===14)||
|
(key==="raising"&&i===14)||
|
||||||
(key==="resolution"&&i===15)) {
|
(key==="resolution"&&i===15)) {
|
||||||
if (data.floor_storage[key]>0) {
|
if (data.floor_storage[key]>0) {
|
||||||
return true
|
return 1
|
||||||
|
} else {
|
||||||
|
return 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return 0
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -69,7 +71,7 @@ function App() {
|
|||||||
{
|
{
|
||||||
data.pomander.map((pom,i)=>{
|
data.pomander.map((pom,i)=>{
|
||||||
return <>
|
return <>
|
||||||
{NameMatches(i)&&<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>}
|
{NameMatches(i)==2?<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>:NameMatches(i)==1&&<div className="floating dotused" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>}
|
||||||
<div className="floating current" style={{left:48+(i%6)*64,top:80+Math.floor(i/6)*64,fontSize:24}}>
|
<div className="floating current" style={{left:48+(i%6)*64,top:80+Math.floor(i/6)*64,fontSize:24}}>
|
||||||
{pom[1]}</div>
|
{pom[1]}</div>
|
||||||
<div className="floating alltime" style={{left:48+(i%6)*64,top:104+Math.floor(i/6)*64,fontSize:24}}>
|
<div className="floating alltime" style={{left:48+(i%6)*64,top:104+Math.floor(i/6)*64,fontSize:24}}>
|
||||||
@ -114,10 +116,9 @@ function App() {
|
|||||||
<div className="floating current" style={{left:345-CenterAlignAdjust(data.death_count[0],32),top:416,fontSize:32}}>
|
<div className="floating current" style={{left:345-CenterAlignAdjust(data.death_count[0],32),top:416,fontSize:32}}>
|
||||||
{data.death_count[0]}</div>
|
{data.death_count[0]}</div>
|
||||||
<div className="floating alltime" style={{left:422-CenterAlignAdjust(data.death_count[0],32),top:464,fontSize:32}}>
|
<div className="floating alltime" style={{left:422-CenterAlignAdjust(data.death_count[0],32),top:464,fontSize:32}}>
|
||||||
{data.death_count[0]}</div>
|
{data.death_count[1]}</div>
|
||||||
{
|
{
|
||||||
data.floor_effects.map((eff,i)=>{
|
data.floor_effects.map((eff,i)=>{
|
||||||
console.log(data.floor_buff_storage)
|
|
||||||
return <>
|
return <>
|
||||||
{i in data.floor_buff_storage&&<div className={"floating "+((i<=1)?"smoldotgreen":"smoldot")} style={{left:48+Math.floor(i/3)*96,top:528+(i%3)*48+((i<=1)?-4:0),fontSize:16}}/>}
|
{i in data.floor_buff_storage&&<div className={"floating "+((i<=1)?"smoldotgreen":"smoldot")} style={{left:48+Math.floor(i/3)*96,top:528+(i%3)*48+((i<=1)?-4:0),fontSize:16}}/>}
|
||||||
<div className="floating current" style={{left:96+Math.floor(i/3)*96,top:534+(i%3)*48,fontSize:16}}>
|
<div className="floating current" style={{left:96+Math.floor(i/3)*96,top:534+(i%3)*48,fontSize:16}}>
|
||||||
|
@ -1,84 +1,84 @@
|
|||||||
{
|
{
|
||||||
"pomander": [
|
"pomander": [
|
||||||
[
|
[
|
||||||
3,
|
2,
|
||||||
1,
|
4,
|
||||||
6
|
19
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
3,
|
3,
|
||||||
12
|
27
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
1,
|
4,
|
||||||
24
|
51
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
1,
|
6,
|
||||||
17
|
42
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
0,
|
3,
|
||||||
7
|
15
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
2,
|
||||||
1,
|
2,
|
||||||
5
|
|
||||||
],
|
|
||||||
[
|
|
||||||
3,
|
|
||||||
0,
|
|
||||||
14
|
14
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
|
3,
|
||||||
|
23
|
||||||
|
],
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
32
|
||||||
|
],
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
27
|
||||||
|
],
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
25
|
||||||
|
],
|
||||||
|
[
|
||||||
0,
|
0,
|
||||||
8
|
0,
|
||||||
|
25
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
3,
|
4,
|
||||||
14
|
|
||||||
],
|
|
||||||
[
|
|
||||||
3,
|
|
||||||
1,
|
|
||||||
20
|
20
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
|
3,
|
||||||
|
25
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
0,
|
0,
|
||||||
13
|
13
|
||||||
],
|
|
||||||
[
|
|
||||||
3,
|
|
||||||
1,
|
|
||||||
13
|
|
||||||
],
|
|
||||||
[
|
|
||||||
2,
|
|
||||||
0,
|
|
||||||
8
|
|
||||||
],
|
|
||||||
[
|
|
||||||
3,
|
|
||||||
1,
|
|
||||||
13
|
|
||||||
],
|
|
||||||
[
|
|
||||||
3,
|
|
||||||
0,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
8
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"accursed_hoard": [
|
"accursed_hoard": [
|
||||||
@ -88,7 +88,7 @@
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
0
|
4
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
@ -100,21 +100,21 @@
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
"mimics": [
|
"mimics": [
|
||||||
14,
|
43,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"traps": [
|
"traps": [
|
||||||
[
|
[
|
||||||
1,
|
3,
|
||||||
2
|
7
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
2
|
6
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
1,
|
2,
|
||||||
2
|
4
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
@ -122,50 +122,50 @@
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
1
|
5
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"floor_effects": [
|
"floor_effects": [
|
||||||
[
|
[
|
||||||
0,
|
1,
|
||||||
0
|
5
|
||||||
|
],
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
6
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
2
|
7
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
4
|
3
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
1
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
1,
|
1,
|
||||||
5
|
5
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
1,
|
0,
|
||||||
2
|
2
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
0
|
3
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
1,
|
0,
|
||||||
2
|
2
|
||||||
],
|
],
|
||||||
[
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
3
|
3
|
||||||
@ -173,15 +173,11 @@
|
|||||||
],
|
],
|
||||||
"death_count": [
|
"death_count": [
|
||||||
0,
|
0,
|
||||||
3
|
5
|
||||||
],
|
],
|
||||||
"floor": 64,
|
"floor": 20,
|
||||||
"accursed_hoard_detected": false,
|
"accursed_hoard_detected": false,
|
||||||
"previous_pomander": "fortune",
|
"previous_pomander": "",
|
||||||
"floor_storage": {
|
"floor_storage": {},
|
||||||
"fortune": 1
|
"floor_buff_storage": {}
|
||||||
},
|
|
||||||
"floor_buff_storage": {
|
|
||||||
"4": true
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -158,6 +158,9 @@ function ParseString(str) {
|
|||||||
pomander_name=pomander_name.substring(0,pomander_name.length-1)
|
pomander_name=pomander_name.substring(0,pomander_name.length-1)
|
||||||
var pomander_slot = GetPomanderSlot(pomander_name)
|
var pomander_slot = GetPomanderSlot(pomander_name)
|
||||||
pomander[pomander_slot][0]-=1
|
pomander[pomander_slot][0]-=1
|
||||||
|
if (!floor_storage.hasOwnProperty(pomander_name)) {
|
||||||
|
floor_storage[pomander_name]=0
|
||||||
|
}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("uses a pomander of ")) {
|
if (split[4].includes("uses a pomander of ")) {
|
||||||
|
@ -301,67 +301,67 @@ function ParseString(str) {
|
|||||||
if (split[4].includes("An ancient enchantment stimulates your humours, increasing the speed with which you act.")) {
|
if (split[4].includes("An ancient enchantment stimulates your humours, increasing the speed with which you act.")) {
|
||||||
floor_effects[0][0]++
|
floor_effects[0][0]++
|
||||||
floor_effects[0][1]++
|
floor_effects[0][1]++
|
||||||
floor_buff_storage={0:true}
|
floor_buff_storage={...floor_buff_storage,0:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("An ancient enchantment revitalizes your body and mind.")) {
|
if (split[4].includes("An ancient enchantment revitalizes your body and mind.")) {
|
||||||
floor_effects[1][0]++
|
floor_effects[1][0]++
|
||||||
floor_effects[1][1]++
|
floor_effects[1][1]++
|
||||||
floor_buff_storage={1:true}
|
floor_buff_storage={...floor_buff_storage,1:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("The gathering gloom appears to invigorate the floor's denizens.")) {
|
if (split[4].includes("The gathering gloom appears to invigorate the floor's denizens.")) {
|
||||||
floor_effects[2][0]++
|
floor_effects[2][0]++
|
||||||
floor_effects[2][1]++
|
floor_effects[2][1]++
|
||||||
floor_buff_storage={2:true}
|
floor_buff_storage={...floor_buff_storage,2:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("An ancient enchantment clouds your eyes, making it difficult to discern your quarry.")) {
|
if (split[4].includes("An ancient enchantment clouds your eyes, making it difficult to discern your quarry.")) {
|
||||||
floor_effects[3][0]++
|
floor_effects[3][0]++
|
||||||
floor_effects[3][1]++
|
floor_effects[3][1]++
|
||||||
floor_buff_storage={3:true}
|
floor_buff_storage={...floor_buff_storage,3:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("The items in your bag have temporarily transformed into worthless stone.")) {
|
if (split[4].includes("The items in your bag have temporarily transformed into worthless stone.")) {
|
||||||
floor_effects[4][0]++
|
floor_effects[4][0]++
|
||||||
floor_effects[4][1]++
|
floor_effects[4][1]++
|
||||||
floor_buff_storage={4:true}
|
floor_buff_storage={...floor_buff_storage,4:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("An ancient enchantment clouds your mind, making it impossible to remember previously learned abilities.")) {
|
if (split[4].includes("An ancient enchantment clouds your mind, making it impossible to remember previously learned abilities.")) {
|
||||||
floor_effects[5][0]++
|
floor_effects[5][0]++
|
||||||
floor_effects[5][1]++
|
floor_effects[5][1]++
|
||||||
floor_buff_storage={5:true}
|
floor_buff_storage={...floor_buff_storage,5:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("An ancient enchantment saps your health.")) {
|
if (split[4].includes("An ancient enchantment saps your health.")) {
|
||||||
floor_effects[6][0]++
|
floor_effects[6][0]++
|
||||||
floor_effects[6][1]++
|
floor_effects[6][1]++
|
||||||
floor_buff_storage={6:true}
|
floor_buff_storage={...floor_buff_storage,6:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("An ancient enchantment saps your very strength, weakening your blows.")) {
|
if (split[4].includes("An ancient enchantment saps your very strength, weakening your blows.")) {
|
||||||
floor_effects[7][0]++
|
floor_effects[7][0]++
|
||||||
floor_effects[7][1]++
|
floor_effects[7][1]++
|
||||||
floor_buff_storage={7:true}
|
floor_buff_storage={...floor_buff_storage,7:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("Your body is fatigued and wounds refuse to heal on their own.")) {
|
if (split[4].includes("Your body is fatigued and wounds refuse to heal on their own.")) {
|
||||||
floor_effects[8][0]++
|
floor_effects[8][0]++
|
||||||
floor_effects[8][1]++
|
floor_effects[8][1]++
|
||||||
floor_buff_storage={8:true}
|
floor_buff_storage={...floor_buff_storage,8:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("Your entire body feels heavy.")) {
|
if (split[4].includes("Your entire body feels heavy.")) {
|
||||||
floor_effects[9][0]++
|
floor_effects[9][0]++
|
||||||
floor_effects[9][1]++
|
floor_effects[9][1]++
|
||||||
floor_buff_storage={9:true}
|
floor_buff_storage={...floor_buff_storage,9:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
} else
|
} else
|
||||||
if (split[4].includes("You find yourself short of breath, unable to sprint.")) {
|
if (split[4].includes("You find yourself short of breath, unable to sprint.")) {
|
||||||
floor_effects[10][0]++
|
floor_effects[10][0]++
|
||||||
floor_effects[10][1]++
|
floor_effects[10][1]++
|
||||||
floor_buff_storage={10:true}
|
floor_buff_storage={...floor_buff_storage,10:true}
|
||||||
update_file=true
|
update_file=true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user