Skip to content

Commit

Permalink
Added name text effect for 7777HP
Browse files Browse the repository at this point in the history
  • Loading branch information
Shojy committed Oct 10, 2018
1 parent b765534 commit 761a2a1
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 25 deletions.
39 changes: 23 additions & 16 deletions Tseng/Models/StatusEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ namespace Tseng.Models
public enum StatusEffect:uint
{
None = 0x00000000,

Death = 0x00000001,
NearDeath = 0x00000002,
Sleep = 0x00000004,
Poison = 0x00000008,
Sadness = 0x00000010,
Fury = 0x00000020,
Confusion = 0x00000040,
Silence = 0x00000080,
Haste = 0x00000100,
Slow = 0x00000200,
Stop = 0x00000400,
Frog = 0x00000800,
Small = 0x00001000,
SlowNumb = 0x00002000,
Petrify = 0x00004000,
Regen = 0x00008000,

Barrier = 0x00010000,
MBarrier = 0x00020000,
Reflect = 0x00040000,
Expand All @@ -17,22 +35,11 @@ public enum StatusEffect:uint
Paralyzed = 0x02000000,
Darkness = 0x04000000,

Death = 0x0001,
NearDeath = 0x0002,
Sleep = 0x0004,
Poison = 0x0008,
Sadness = 0x0010,
Fury = 0x0020,
Confusion = 0x0040,
Silence = 0x0080,
Haste = 0x0100,
Slow = 0x0200,
Stop = 0x0400,
Frog = 0x0800,
Small = 0x1000,
SlowNumb = 0x2000,
Petrify = 0x4000,
Regen = 0x8000,
//Dual = ????,
//Imprisoned = ????,
//Resist = ????,
//Lucky = ????,

}

/*
Expand Down
57 changes: 48 additions & 9 deletions Tseng/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
height: 24px;
margin: 0 !important;
padding: 0 !important;
}
.base {
Expand Down Expand Up @@ -137,23 +136,57 @@
margin: 0 !important;
padding: 0 !important;
width: 60px;
}
.ff7 .text .character.dead * {
color: #ab0000;
}
.ff7 { clear: both;}
.ff7 {
clear: both;
}
.hidden {
.hidden {
visibility: hidden;
}
.status span {
display: none;
}
.rainbow {
animation: rainbow .5s infinite;
}
@@keyframes rainbow {
0% {
color: orange;
}
10% {
color: purple;
}
20% {
color: red;
}
40% {
color: yellow;
}
60% {
color: green;
}
80% {
color: blue;
}
100% {
color: orange;
}
}
</style>


Expand Down Expand Up @@ -258,15 +291,15 @@
charStatus.push([]);
charStatus.push([]);
charStatus.push([]);
var updateCharacters = function () {
$.getJSON("/Home/Data",
null,
function (data) {
console.log(data);
$('.gil').text(data.gil + ' Gil');
$('.location').text(data.location);
for (var i = 0; i < 3; ++i) {
var char = data.party[i];
var ch = $('.character:nth-child(' + (i + 1) + ')');
Expand All @@ -293,6 +326,12 @@
ch.removeClass('dead');
}
if (char.currentHp == 7777) {
ch.find('.name').addClass('rainbow');
} else {
ch.find('.name').removeClass('rainbow');
}
ch.find('.level').text(char.level);
ch.find('.current-hp').text(char.currentHp);
Expand Down Expand Up @@ -379,7 +418,7 @@
}
})
.always(function() {
.always(function () {
setTimeout(updateCharacters, 500);
});
Expand All @@ -393,7 +432,7 @@
var index = 0;
var cycleStatus = function() {
var cycleStatus = function () {
for (var i = 0; i < 3; ++i) {
if (charStatus[i].length == 0 || charStatus[i][index % charStatus[i].length] == 'None') {
$('.character:nth-child(' + (i + 1) + ') .status').html('');
Expand Down

0 comments on commit 761a2a1

Please sign in to comment.