add ko event back but doing it right
This commit is contained in:
parent
e540128a94
commit
7b054340d4
@ -181,3 +181,12 @@ button {
|
||||
color: @blue;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes target-ko {
|
||||
0% {
|
||||
opacity: 100%;
|
||||
}
|
||||
100% {
|
||||
opacity: 20%;
|
||||
}
|
||||
}
|
||||
@ -201,6 +201,10 @@
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
&.ko-transition {
|
||||
animation: target-ko 1s ease-in-out 0s 1;
|
||||
}
|
||||
|
||||
&.ko {
|
||||
animation: none;
|
||||
opacity: 0.20;
|
||||
|
||||
@ -111,7 +111,7 @@ function getText(resolution) {
|
||||
function generatePostSkill() {
|
||||
const [type, event] = resolution.event;
|
||||
if (type === 'Ko') {
|
||||
return { text: 'KO!', css: 'ko' };
|
||||
return { text: 'KO!', css: 'ko-transition' };
|
||||
}
|
||||
|
||||
if (type === 'Disable') {
|
||||
|
||||
@ -117,7 +117,8 @@ class GameConstruct extends Component {
|
||||
setGameEffectInfo,
|
||||
} = this.props;
|
||||
|
||||
const ko = construct.green_life.value === 0 ? 'ko' : '';
|
||||
const koEvent = animText ? animText.text === 'KO!' && animText.constructId === construct.id : false;
|
||||
const ko = construct.green_life.value === 0 && !koEvent ? 'ko' : '';
|
||||
const classes = eventClasses(animating, animFocus, construct, animText);
|
||||
|
||||
const stats = ['RedLife', 'GreenLife', 'BlueLife'].map((s, j) => (
|
||||
|
||||
@ -353,8 +353,8 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
|
||||
};
|
||||
|
||||
if target.is_ko() {
|
||||
// resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
|
||||
target.effects.clear();
|
||||
resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
|
||||
}
|
||||
|
||||
game.update_construct(&mut source);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user