View difference between Paste ID: qs0rDEGu and ZX5vN03d
SHOW: | | - or go back to the newest paste.
1
# COUNTER-CLOCKWISE SPIRAL (ABILITY)
2
3
	counterclockwisespiral: {
4
		desc: "On switch-in, the field becomes Trick Room. This room remains in effect until this Ability is no longer active for any Pokémon.",
5
		shortDesc: "On switch-in, Trick Room begins until this Ability is not active in battle.",
6
		onStart(source) {
7
			this.field.removePseudoWeather('trickroom');
8
			this.field.addPseudoWeather('trickroom');
9
		},
10
		onAnyTryMove(target, source, effect) {
11
			if (['trickroom'].includes(effect.id)) {
12
				this.attrLastMove('[still]');
13
				this.add('cant', this.effectData.target, 'ability: Counter-Clockwise Spiral', effect, '[of] ' + target);
14
				return false;
15
			}
16
		},
17
		onEnd(pokemon) {
18
			if (this.field.pseudoWeatherData.source !== pokemon) return;
19
			for (const target of this.getAllActive()) {
20
				if (target === pokemon) continue;
21
				if (target.hasAbility('counterclockwisespiral')) {
22
					this.field.pseudoWeatherData.source = target;
23
					return;
24
				}
25
			}
26-
			this.field.clearTerrain();
26+
27
		},
28
		name: "Counter-Clockwise Spiral",
29
		rating: 4.5,
30
		num: -1011,
31
	},
32
33
# TRICK ROOM (MOVE)
34
35
	trickroom: {
36
		num: 433,
37
		accuracy: true,
38
		basePower: 0,
39
		category: "Status",
40
		desc: "For 5 turns, the Speed of every Pokemon is recalculated for the purposes of determining turn order. During the effect, each Pokemon's Speed is considered to be (10000 - its normal Speed), and if this value is greater than 8191, 8192 is subtracted from it. If this move is used during the effect, the effect ends.",
41
		shortDesc: "Goes last. For 5 turns, turn order is reversed.",
42
		name: "Trick Room",
43
		pp: 5,
44
		priority: -7,
45
		flags: {mirror: 1},
46
		pseudoWeather: 'trickroom',
47
		effect: {
48
			duration: 5,
49
			durationCallback(source, effect) {
50
				if (source?.hasAbility('persistent')) {
51
					this.add('-activate', source, 'ability: Persistent', effect);
52
					return 7;
53
				}
54
				if (source?.hasAbility('counterclockwisespiral')) {
55
					this.add('-activate', source, 'ability: Counter-Clockwise Spiral', effect);
56
					return 0;
57
				}
58
				return 5;
59
			},
60
			onStart(target, source) {
61
				this.add('-fieldstart', 'move: Trick Room', '[of] ' + source);
62
			},
63
			onRestart(target, source) {
64
				this.field.removePseudoWeather('trickroom');
65
			},
66
			// Speed modification is changed in Pokemon.getActionSpeed() in sim/pokemon.js
67
			onResidualOrder: 23,
68
			onEnd() {
69
				this.add('-fieldend', 'move: Trick Room');
70
			},
71
		},
72
		secondary: null,
73
		target: "all",
74
		type: "Psychic",
75
		zMove: {boost: {accuracy: 1}},
76
		contestType: "Clever",
77
	},