Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오명준
/
probability_simulator
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오명준
2021-11-05 00:39:42 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b85a30cc0096b6eae89a814819eb4e2e51d7c623
b85a30cc
1 parent
dcdb0901
Add new sim 'Guardian Tales Character'(js)
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
205 additions
and
0 deletions
GuardianTales_character.js
GuardianTales_character.js
0 → 100644
View file @
b85a30c
function
calcP
()
{
var
trial
=
document
.
getElementsByName
(
"trial"
);
var
c1
=
document
.
getElementById
(
"c1"
);
var
c2
=
document
.
getElementById
(
"c2"
);
var
c3
=
document
.
getElementById
(
"c3"
);
var
c4
=
document
.
getElementById
(
"c4"
);
var
c5
=
document
.
getElementById
(
"c5"
);
var
c6
=
document
.
getElementById
(
"c6"
);
var
c7
=
document
.
getElementById
(
"c7"
);
var
c8
=
document
.
getElementById
(
"c8"
);
var
c9
=
document
.
getElementById
(
"c9"
);
var
c10
=
document
.
getElementById
(
"c10"
);
var
probability
,
index
;
var
character
;
if
(
trial
[
2
].
checked
==
true
)
{
probability
=
Math
.
random
()
*
100
;
if
(
probability
<
78.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
22
);
character
=
[
"린다"
,
"밥"
,
"하이퍼"
,
"마리아"
,
"리사"
,
"레아"
,
"제이"
,
"드래곤"
,
"블레이드"
,
"미나"
,
"동태"
,
"페기"
,
"에일리"
,
"오렐리"
,
"캉"
,
"아가사"
,
"다빈치"
,
"케이트"
,
"조이"
,
"리오"
,
"나이언"
,
"마티 주니어"
];
c1
.
innerHTML
=
"★1 "
+
character
[
index
];
}
else
if
(
probability
<
97.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
29
);
character
=
[
"기사"
,
"에바"
,
"엘비라"
,
"하얀 야수"
,
"카리나"
,
"로레인"
,
"라비"
,
"파비"
,
"아오바"
,
"그레모리"
,
"레이첼"
,
"헤카테"
,
"코코"
,
"마리안"
,
"소히"
,
"페이/메이"
,
"마빈"
,
"크레이그"
,
"아카유키"
,
"란팡"
,
"유즈"
,
"아이샤"
,
"샤피라"
,
"돌프"
,
"에이미"
,
"기르가스"
,
"캐서린"
,
"리에"
,
"네바"
];
c1
.
innerHTML
=
"★2 "
+
character
[
index
];
}
else
{
index
=
Math
.
floor
(
Math
.
random
()
*
2
);
character
=
[
"픽업 영웅"
,
"픽업 영웅X"
];
c1
.
innerHTML
=
"★3 "
+
character
[
index
];
}
}
else
if
(
trial
[
3
].
checked
==
true
)
{
var
characterSet
=
[
c1
,
c2
,
c3
,
c4
,
c5
,
c6
,
c7
,
c8
,
c9
,
c10
];
for
(
var
i
=
0
;
i
<
9
;
i
++
)
{
probability
=
Math
.
random
()
*
100
;
if
(
probability
<
78.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
22
);
character
=
[
"린다"
,
"밥"
,
"하이퍼"
,
"마리아"
,
"리사"
,
"레아"
,
"제이"
,
"드래곤"
,
"블레이드"
,
"미나"
,
"동태"
,
"페기"
,
"에일리"
,
"오렐리"
,
"캉"
,
"아가사"
,
"다빈치"
,
"케이트"
,
"조이"
,
"리오"
,
"나이언"
,
"마티 주니어"
];
characterSet
[
i
].
innerHTML
=
"★1 "
+
character
[
index
];
}
else
if
(
probability
<
97.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
29
);
character
=
[
"기사"
,
"에바"
,
"엘비라"
,
"하얀 야수"
,
"카리나"
,
"로레인"
,
"라비"
,
"파비"
,
"아오바"
,
"그레모리"
,
"레이첼"
,
"헤카테"
,
"코코"
,
"마리안"
,
"소히"
,
"페이/메이"
,
"마빈"
,
"크레이그"
,
"아카유키"
,
"란팡"
,
"유즈"
,
"아이샤"
,
"샤피라"
,
"돌프"
,
"에이미"
,
"기르가스"
,
"캐서린"
,
"리에"
,
"네바"
];
characterSet
[
i
].
innerHTML
=
"★2 "
+
character
[
index
];
}
else
{
index
=
Math
.
floor
(
Math
.
random
()
*
2
);
character
=
[
"픽업 영웅"
,
"픽업 영웅X"
];
characterSet
[
i
].
innerHTML
=
"★3 "
+
character
[
index
];
}
}
probability
=
Math
.
random
()
*
100
;
if
(
probability
<
97.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
29
);
character
=
[
"기사"
,
"에바"
,
"엘비라"
,
"하얀 야수"
,
"카리나"
,
"로레인"
,
"라비"
,
"파비"
,
"아오바"
,
"그레모리"
,
"레이첼"
,
"헤카테"
,
"코코"
,
"마리안"
,
"소히"
,
"페이/메이"
,
"마빈"
,
"크레이그"
,
"아카유키"
,
"란팡"
,
"유즈"
,
"아이샤"
,
"샤피라"
,
"돌프"
,
"에이미"
,
"기르가스"
,
"캐서린"
,
"리에"
,
"네바"
];
characterSet
[
9
].
innerHTML
=
"★2 "
+
character
[
index
];
}
else
{
index
=
Math
.
floor
(
Math
.
random
()
*
2
);
character
=
[
"픽업 영웅"
,
"픽업 영웅X"
];
characterSet
[
9
].
innerHTML
=
"★3 "
+
character
[
index
];
}
}
else
if
(
trial
[
0
].
checked
==
true
)
{
probability
=
Math
.
random
()
*
100
;
if
(
probability
<
78.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
22
);
character
=
[
"린다"
,
"밥"
,
"하이퍼"
,
"마리아"
,
"리사"
,
"레아"
,
"제이"
,
"드래곤"
,
"블레이드"
,
"미나"
,
"동태"
,
"페기"
,
"에일리"
,
"오렐리"
,
"캉"
,
"아가사"
,
"다빈치"
,
"케이트"
,
"조이"
,
"리오"
,
"나이언"
,
"마티 주니어"
];
c1
.
innerHTML
=
"★1 "
+
character
[
index
];
}
else
if
(
probability
<
97.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
29
);
character
=
[
"기사"
,
"에바"
,
"엘비라"
,
"하얀 야수"
,
"카리나"
,
"로레인"
,
"라비"
,
"파비"
,
"아오바"
,
"그레모리"
,
"레이첼"
,
"헤카테"
,
"코코"
,
"마리안"
,
"소히"
,
"페이/메이"
,
"마빈"
,
"크레이그"
,
"아카유키"
,
"란팡"
,
"유즈"
,
"아이샤"
,
"샤피라"
,
"돌프"
,
"에이미"
,
"기르가스"
,
"캐서린"
,
"리에"
,
"네바"
];
c1
.
innerHTML
=
"★2 "
+
character
[
index
];
}
else
{
index
=
Math
.
floor
(
Math
.
random
()
*
39
);
character
=
[
"플리트비체"
,
"라피스"
,
"아라벨"
,
"에바(아이돌)"
,
"마리나"
,
"바리"
,
"루피나"
,
"란"
,
"유진"
,
"티니아"
,
"비슈바크"
,
"나리"
,
"비앙카"
,
"오그마"
,
"알레프"
,
"미야"
,
"미래 공주"
,
"가람"
,
"베스"
,
"루"
,
"가브리엘"
,
"린"
,
"미래 기사"
,
"베로니카"
,
"녹시아"
,
"메이릴"
,
"Mk.99"
,
"리리스"
,
"루시"
,
"소히(해변)"
,
"유즈(라이프 가드)"
,
"엘레노아"
,
"신틸라"
,
"에리나"
,
"카마엘"
,
"Mk.2"
,
"오르카"
,
"칸나"
,
"하나"
];
c1
.
innerHTML
=
"★3 "
+
character
[
index
];
}
}
else
if
(
trial
[
1
].
checked
==
true
)
{
var
characterSet
=
[
c1
,
c2
,
c3
,
c4
,
c5
,
c6
,
c7
,
c8
,
c9
,
c10
];
for
(
var
i
=
0
;
i
<
9
;
i
++
)
{
probability
=
Math
.
random
()
*
100
;
if
(
probability
<
78.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
22
);
character
=
[
"린다"
,
"밥"
,
"하이퍼"
,
"마리아"
,
"리사"
,
"레아"
,
"제이"
,
"드래곤"
,
"블레이드"
,
"미나"
,
"동태"
,
"페기"
,
"에일리"
,
"오렐리"
,
"캉"
,
"아가사"
,
"다빈치"
,
"케이트"
,
"조이"
,
"리오"
,
"나이언"
,
"마티 주니어"
];
characterSet
[
i
].
innerHTML
=
"★1 "
+
character
[
index
];
}
else
if
(
probability
<
97.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
29
);
character
=
[
"기사"
,
"에바"
,
"엘비라"
,
"하얀 야수"
,
"카리나"
,
"로레인"
,
"라비"
,
"파비"
,
"아오바"
,
"그레모리"
,
"레이첼"
,
"헤카테"
,
"코코"
,
"마리안"
,
"소히"
,
"페이/메이"
,
"마빈"
,
"크레이그"
,
"아카유키"
,
"란팡"
,
"유즈"
,
"아이샤"
,
"샤피라"
,
"돌프"
,
"에이미"
,
"기르가스"
,
"캐서린"
,
"리에"
,
"네바"
];
characterSet
[
i
].
innerHTML
=
"★2 "
+
character
[
index
];
}
else
{
index
=
Math
.
floor
(
Math
.
random
()
*
39
);
character
=
[
"플리트비체"
,
"라피스"
,
"아라벨"
,
"에바(아이돌)"
,
"마리나"
,
"바리"
,
"루피나"
,
"란"
,
"유진"
,
"티니아"
,
"비슈바크"
,
"나리"
,
"비앙카"
,
"오그마"
,
"알레프"
,
"미야"
,
"미래 공주"
,
"가람"
,
"베스"
,
"루"
,
"가브리엘"
,
"린"
,
"미래 기사"
,
"베로니카"
,
"녹시아"
,
"메이릴"
,
"Mk.99"
,
"리리스"
,
"루시"
,
"소히(해변)"
,
"유즈(라이프 가드)"
,
"엘레노아"
,
"신틸라"
,
"에리나"
,
"카마엘"
,
"Mk.2"
,
"오르카"
,
"칸나"
,
"하나"
];
characterSet
[
i
].
innerHTML
=
"★3 "
+
character
[
index
];
}
}
probability
=
Math
.
random
()
*
100
;
if
(
probability
<
97.25
)
{
index
=
Math
.
floor
(
Math
.
random
()
*
29
);
character
=
[
"기사"
,
"에바"
,
"엘비라"
,
"하얀 야수"
,
"카리나"
,
"로레인"
,
"라비"
,
"파비"
,
"아오바"
,
"그레모리"
,
"레이첼"
,
"헤카테"
,
"코코"
,
"마리안"
,
"소히"
,
"페이/메이"
,
"마빈"
,
"크레이그"
,
"아카유키"
,
"란팡"
,
"유즈"
,
"아이샤"
,
"샤피라"
,
"돌프"
,
"에이미"
,
"기르가스"
,
"캐서린"
,
"리에"
,
"네바"
];
characterSet
[
9
].
innerHTML
=
"★2 "
+
character
[
index
];
}
else
{
index
=
Math
.
floor
(
Math
.
random
()
*
39
);
character
=
[
"플리트비체"
,
"라피스"
,
"아라벨"
,
"에바(아이돌)"
,
"마리나"
,
"바리"
,
"루피나"
,
"란"
,
"유진"
,
"티니아"
,
"비슈바크"
,
"나리"
,
"비앙카"
,
"오그마"
,
"알레프"
,
"미야"
,
"미래 공주"
,
"가람"
,
"베스"
,
"루"
,
"가브리엘"
,
"린"
,
"미래 기사"
,
"베로니카"
,
"녹시아"
,
"메이릴"
,
"Mk.99"
,
"리리스"
,
"루시"
,
"소히(해변)"
,
"유즈(라이프 가드)"
,
"엘레노아"
,
"신틸라"
,
"에리나"
,
"카마엘"
,
"Mk.2"
,
"오르카"
,
"칸나"
,
"하나"
];
characterSet
[
9
].
innerHTML
=
"★3 "
+
character
[
index
];
}
}
}
Please
register
or
login
to post a comment