{"size": 1235, "ext": "js", "max_stars_repo_path": "mod archive/eternal/statuses.js", "max_stars_repo_name": "JesusFreakTW/DH", "max_stars_repo_stars_event_min_datetime": "2016-10-16T13:15:20.000Z", "max_stars_repo_stars_event_max_datetime": "2018-05-28T01:11:16.000Z", "max_issues_repo_path": "mod archive/eternal/statuses.js", "max_issues_repo_name": "JesusFreakTW/DH", "max_issues_repo_issues_event_min_datetime": "2016-08-14T02:02:22.000Z", "max_issues_repo_issues_event_max_datetime": "2019-01-23T22:23:47.000Z", "max_forks_repo_path": "mod archive/eternal/statuses.js", "max_forks_repo_name": "JesusFreakTW/DH", "max_forks_repo_forks_event_min_datetime": "2019-09-08T06:34:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T16:09:36.000Z"}
{"max_stars_count": 10, "max_issues_count": 147, "max_forks_count": 98, "avg_line_length": 28.0681818182, "max_line_length": 143, "alphanum_fraction": 0.6599190283}
'use strict';

/**@type {{[k: string]: EffectData}} */
let BattleStatuses = {

despoilingvines: {
		name: 'despoilingvines',
		id: 'despoilingvines',
		num: 0,
		duration: 5,
		durationCallback: function (target, source) {
			if (source.hasItem('gripclaw')) return 8;
			return this.random(5, 7);
		},
		onStart: function (pokemon, source) {
			this.add('-activate', pokemon, 'move: ' + this.effectData.sourceEffect, '[of] ' + source);
		},
		onResidualOrder: 11,
		onResidual: function (pokemon) {
			if (this.effectData.source && (!this.effectData.source.isActive || this.effectData.source.hp <= 0 || !this.effectData.source.activeTurns)) {
				delete pokemon.volatiles['despoilingvines'];
				return;
			}
			if (this.effectData.source.hasItem('bindingband')) {
				this.damage(pokemon.maxhp / 6);
			} else {
				this.damage(pokemon.maxhp / 8);
			}
		},
	  onFoeAfterMove: function (source) {
		  this.heal(source.maxhp / 8);
	  },
		onEnd: function (pokemon) {
			this.add('-end', pokemon, this.effectData.sourceEffect, '[despoilingvines]');
		},
		onTrapPokemon: function (pokemon) {
			if (this.effectData.source && this.effectData.source.isActive) pokemon.tryTrap();
		},
	},
  
  };

exports.BattleStatuses = BattleStatuses;
